# Algorithm, Code, Quiz, Math, Simple, Programming, Easy Questions

Budget $30-250 USD

Hello,

I am looking for some one who can code excellent algorithms, have clear concepts in programming, good with data structures and can code with good design.

Who has good understanding about Big O notations and time/space complexity. If you can answer below questions, and provide support (online) for an hour. You will be awarded this project and good money, excellent feedback and bonus on good work. I am 5.0/5.0 employer. I will create 100% Milestone Money. It will be fun, exciting to work together.

****** Please Refer to the attached File.

BASIC ALGORITHMS

1. What is the best data structure to implement priority queue?

2. What are the worst case time complexity of the following algorithms, performed on containers of size N:

(a) Locating a number in an unsorted array.

(b) Locating a number in a sorted array.

(c) Inserting a number in a balanced binary tree

(f) Deleting a number from an unbalanced binary tree

(g) Building a heap

(h) Adding a number to a hash table

(i) Sorting an array

3. What is the relation (less, greater, equal) between O(n) and O(2n)? O(log2 N) and O(log10 N)?

CODING

EXPECTED TIME TO COMPLETE: 20-30 minutes

1. In a two dimensional array of integers of size m x n, for each element which value is zero, set to zero the entire row and

the column where this element is located, and leave the rest of the elements untouched.

2. Write a function that takes an integer argument and returns the corresponding Excel column name.

For instance 1 would return 'A', 2 would return 'B', ...., 27 would return 'AA' and so on

3. Write code to merge 3 sorted arrays of integers (all different sizes) into a single sorted array.

DEBUGGING

1. Find the bug in the following code:

// Find the first break in monotonically increasing sequence Returns c if there is no break.

int r(int *p, size_t c)

{

int i = 0;

while(p[i + 1] >= p[i] && i < c - 1)

++i;

return i + 1;

}

MATH, PROBABILITY, COMPLEXITY

1. A rare disease afflicts 1% of the population. A medical test for this disease has 1% false positive rate (if a person is healthy, there is a 1% probability that the test will show that the person is ill), and 1% false negative rate (if a person is ill, there is a 1% probability that the test will that the person is healthy). A person tests as having the disease. What is the probability that the person actually has the disease?

2. An evil dictator captured you and made you play a game. You are in front of three glasses of wine. Two of them are poisoned; one is not. You must pick one can and drink it. If you survive, the evil dictator will release you. When you pick one of the glasses, the dictator reveals which one of the other two is poisoned, and offers you to stay with your original choice, or switch. Should you switch?

3. In front of you there is a black box. The box can perform two operations: push(N) adds a number to its internal storage; pop-min() extracts the current minimum of all numbers that are currently stored, and makes the box forget it. The numbers are mathematical objects: there is no upper bound. Both push(N) and pop-min() execute in O(1) time. Design and algorithm that could be used to implement such a box.

4. You are asked to design a plotter. A plotter is a computer-controlled device that picks a pen, carries it to a point on paper using mechanical maniplator, lowers it so that it touches the paper, and drags it to the next point drawing a line. In your plotter there will be 3 pens, red, green, and blue. Computer uploads a picture to the plotter which consists of list of segments and colors in which these segments must be drawn. You are asked to reorder the segments such that the work performed by mechanical manipulator is optimal.

Can you design an algorithm that would do so?

5. What is the time complexity of the following algorithm:

unsigned int Rabbits(unsigned int r)

{

return (r < 2) ? r : Rabbits(r - 1) + Rabbits(r - 2);

}

## Awarded to:

I know its my first time to bid, but this is the part I'm expert in this is my accounts on online contest sites which contains a lot of algorithms and data structure problems : TopCoder : [url removed, login to view] More

## 14 freelancers are bidding on average $225 for this job

Hi, I am Algorithm expert and can surely help you with this project. Please let me know if you are interested. Thank you

Thanks for the invitation, I am professional from academic institute. Can we start with a small project. In $80 bid I will work for your project for 7 hours. Or you can offer me project at $11/hr rate with $33 as M More

Hello. I have a master degree in AI and familiar with all of these concepts. I can finish this job in 1 day.

Hi i am a postgraduate student in computer science and i can answer all the questions in minimum time and will provide detailed solution for the same.. Please refer these answer:- ques 3. What is the relation (less, More

Hi, I posses all the skills needed to complete this task. I can complete it for you. Similar to you I am also a 5.0/5.0 rated freelancer and have done many programming projects in the past. Do let me know in what langu More

plz discuss....................................................................................................................................................................

Hi, I already finished few such projects. I am expert in algorithms. I can do it. If you have question you can ask me

I am a professor in Computer science and engineering with specialization in computer algorithms, data structure and mathematical computing. I have been teaching for last 10 years. I have been involved in various R&D ac More