Data Structure:
Show that if k is the smallest integer greater than or equal to n+ (log2n)-2, k comparisons are necessary and sufficient to find the largest and second largest elements of a set of n distinct elements. (k comparisons are required to find what you are looking for, but no more than that are needed)


No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More Programming Languages AllOther Interview Questions

what is log files in qtp what is use

0 Answers   HSBC,


what is best way to create a Thread class & why?

0 Answers  


Diff between %let and Call symput?

1 Answers   Accenture,


how to swap all the values without using temporary variable. tha values r a = 20, x=60 and p=2.

5 Answers   DST Global Solutions, iGate,


In mainframe SDSF, Can we copy the list of jobs currently executing in SDSF in to a seperate DATASET...?

0 Answers   DST Global Solutions,






Given: coordinates of rectangle-> left bottom and right top points. the rectangles create a hole.Find the maximum area of the hole. eg. 4 rectangles create a hole in between. find its area.

0 Answers   Manhattan,


you have a computer with 80GB hard disk and ubuntu 8.04 is installed on entire hard disk.now you have to create a seprate partition for windows OS and install win XP as dual boot.write down the steps involved along with the commands

1 Answers   Anand Group, Indian Navy, TCS,


What is WEB 3.0? What are the features their in WEB3.0

0 Answers  


what is the abap/4

1 Answers  


What is the purpose of <Trigger> element of <updatePanel> in Ajax

0 Answers  


what is polymorphism in java.

3 Answers   Atos Origin,


swap two number wthout using third variable

4 Answers   eClerx,


Categories