- Nth largest number in an array (Selection sort descending O(n^2)): Better method. Find the pivot and look at it's position. Details: Learn QuickSort (Complexity: O(n))
- Nth smallest number in an array (Selection sort ascending) Same as above
- How would you validate an XML document without using any APIs
- given two string arrays find if they contain same strings i.e {"a","b","ab"} and {"ab","ab","a","b"} are same but {"a","b"} and {"ab"} are different
- Design a data structure that has order(1) time complexity for insert, update,delete, ispresent(key) operations
- Implement Find and Delete for binary tree.
- Given two sorted postive integer arrays A(n) and B(n) (W.L.O.G, let's say they are decreasingly sorted), we define a set S = {(a,b) | a \in A and b \in B}. Obviously there are n^2 elements in S. The value of such a pair is defined as Val(a,b) = a + b. Now we want to get the n pairs from S with largest values.

## Monday, May 17, 2010

### Algorithm questions

Subscribe to:
Post Comments (Atom)

## No comments:

Post a Comment