@Shiva: How can min heap be uesd, can you eloborate a bit.
As far as i see, the best possible is O(nlogn) i.e by sorting and scanning
over the complete array once.
On Mon, Oct 10, 2011 at 9:49 AM, shiva@Algo shiv.jays...@gmail.com wrote:
I think Min heap will do that..
On Mon, Oct 10,
Well, I think its not that the algorithm be written with all Google maps
features in place. Rather it is a open ended question, where interviewer is
trying to find
the candidates view of algorithm design.
@Deepak: It should be fine even if some reasonably good algo is given.
my 2 cents:
For the
I think it is 1 / (2N)
(1/N) * (1/N)*(N/2) = 1/(2N)
On Mon, Sep 12, 2011 at 6:33 PM, Akash Mukherjee akash...@gmail.com wrote:
this is a case, but isnt der a case of circular permutation 2??
what say abt dis
0,1
2,3
4,5
0,1
2,3
4,5
it wrks i gues??
On Mon, Sep 12, 2011 at 12:56 PM,