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

Ordered List tag is

1 Answers  


what are partial classes. Where is the entry point of partial classes.

1 Answers   Satyam,


Number of null pointers in any binary tree

5 Answers   Infosys,


Is strus threadsafe or not?

1 Answers  


write the a cl program with the following specification A. Accept 2 parameters-date and date type B. if date type is J then convert date to *MDY format C. if date type is M convert date to *JUL format 4.send a program message with the value of converted date Please explain for each with coding?

0 Answers  






< No Frames > tag is used for

0 Answers  


write algo for cobol program whichuse three flat file to extract some specific information 8 marks mainframe

0 Answers  


What is easiest way to get the PL/i compiler,I didn't have found the compiler in my library. Is there any extra cost if we want to access the PL/1 programs?Actually we r having Mainframe rented training Ids

0 Answers  


10.Define filters,binary to hexadecimal,hexadecimal to decimal?

0 Answers  


In OB52 , How to define two open posting period, Like only 5 and 8 posting should be open.. should not open 6 and 7..period..

0 Answers  


what is the system development cycle

0 Answers  


what is lazy loading in hibernate?Explain in detailed manner?

2 Answers   IBM, TCS,


Categories