[algogeeks] Re: can you solve these questions!!!

2008-01-29 Thread vivek garg
for question no. 2 median wil be the answer because repeated element is one more than the half of the no. of element for finding medain we can use modified quick sort which uses the fact that we have to go only one side depending on the no. of element we found on that side. in general algo will

[algogeeks] Re: How to solve this problem efficiently?

2007-09-27 Thread vivek garg
To store N we can make a binary tree with extra data store is the no of left nodes in tree. now search cost is O(logN) and O(1) is the cost of finding no less than that particular no. also , we can update tree in O(logN) tIme. On Sep 25, 6:16 am, Sticker <[EMAIL PROTECTED]> wrote: > I saw your id