Re: [algogeeks] Re: Inmobi Placement Paper

2012-12-02 Thread vamshi vijay
@Dave Yes u are right.. answers are not mine. I just collected the papers so that it would be useful for others to prepare Anyhow thanks On 2 December 2012 06:23, Dave wrote: > @Vamshi: The first answer should be "min heap," not "max heap." The reason > is that you want to know what the sma

[algogeeks] Re: Inmobi Placement Paper

2012-12-01 Thread Dave
@Vamshi: The first answer should be "min heap," not "max heap." The reason is that you want to know what the smallest of the ten largest numbers you've found so far. So the algorithm is to place the first 10 numbers into the min heap. For each additional number x, if x is greater than the root