Archive
The Last 30 Posts
- 1. You have got 3 sorted arrays A1 A2 and A3 having m n and p elements respectively. A gap of 3 is defined to be max distance between 3 numbers if they are put on a number line say u pick three 2 12 and - 5 March 2010 - 0 comments
- 2. How will you find the MSB and LSB of a number - 5 March 2010 - 0 comments
- 3. How can you get a tree back if traversal of tree output is given - 5 March 2010 - 0 comments
- 4. 2D array search - 5 March 2010 - 0 comments
- 5. How will you write your own sizeof operator - 5 March 2010 - 0 comments
- 6. You are given a very large number N of points (x,y,z) in 3D space. You have to find out the k points which are closest to the origin i.e. (0, 0, 0). You have to do it in the most efficient way. (Sorti - 5 March 2010 - 0 comments
- 7. How will you prove that there is no limit of prime number - 5 March 2010 - 0 comments
- 8. How will you remove duplicate from an unsorted array - 5 March 2010 - 0 comments
- 9. Write an algorithm that deletes consecutive 1, 2, and 3 and so on recurrences of characters - 5 March 2010 - 0 comments
- 10. You have an abstract computer, so just forget everything you know about computers, this one only does what I’m about to tell you it does. You can use as many variables as you need, there are no nega - 5 March 2010 - 0 comments
- 11. Given an expression like (a+((b+c))) where extra braces are provided on b+c, (b+c) is ok. But ((b+c)) isn’t as it contains redundant. So fr given expression u have to find whether expression contain - 5 March 2010 - 0 comments
- 12. Write a function that checks whether the given set of strings is the anagrams of the given input string - 5 March 2010 - 0 comments
- 13. Algorithm to draw a circle - 5 March 2010 - 0 comments
- 14. Solve it - 5 March 2010 - 0 comments
- 15. Given two integers a, b how to divide a/b without using /,% operator - 5 March 2010 - 0 comments
- 16. How will you find out a/b where a and b are integers; Case1) if there is an integer answer we should print it directly.(Example : 4/2=2); Case2) 2. If there is a recurrence in the digits after the dec - 5 March 2010 - 0 comments
- 17. Given an array A of n elements and an integer k, where k less than n; Elements {A[0]…A[k]}and {A[k+1]…A[n]} are already sorted. Give an algorithm to sort the array A in O(n) time and O(1)s - 5 March 2010 - 0 comments
- 18. There is an array in which two number are non-duplicate. Find those - 5 March 2010 - 0 comments
- 19. You are given two set X={ x1,x2,x3………xn} and Y={y1,y2,y3………ym}, You have to apply a Match( X parameter, Y parameter) function on each combination of set X and Y ele - 5 March 2010 - 0 comments
- 20. Simulate doubly linked list using single pointer - 5 March 2010 - 0 comments
- 21. How will you find the kth smalllest element - 5 March 2010 - 0 comments
- 22. Given a dart board of radius `r’, and if a dart is thrown on the board which always falls inside assuming uniform distribution, find the expected distance from the center for the point where the - 5 March 2010 - 0 comments
- 23. input: a array of two elements having value 0 and 1; output: make both elements 0; specifications : i) it is guaranted that one element is 0 but we do not know its position. ii) we can’t say abo - 5 March 2010 - 0 comments
- 24. You are given with an array of integer and the length of array. Now u have to find an index i such that a(i)=i; O(logn)sol is fine if it(index i) exits. But if there is no such index you are unnecessa - 5 March 2010 - 0 comments
- 25. What is the space complexity of Quick Sort - 5 March 2010 - 0 comments
- 26. You can take one step or two steps forward from a given step. So find the total number of ways of reaching Nth step. - 5 March 2010 - 0 comments
- 27. You have 1 to N-1 array and 1 to N numbers, and one number is missing, you need to find the missing the number - 5 March 2010 - 0 comments
- 28. You have an array. Find the maximum and minimum numbers in less number of comparisons. - 5 March 2010 - 0 comments
- 29. 3 strings say A, B, C are given to you. Check whether 3rd string is interleaved from string A and B - 5 March 2010 - 0 comments
- 30. On an empty chessboard, a horse starts from a point (say location x, y) and it starts moving randomly, but once it moves out of board, it can’t come inside. So what is the total probability that it - 5 March 2010 - 0 comments