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
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