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

I am looking for selenium RC online Training in chennai. can any one tell me the best institute

0 Answers  


what is technical system, business system, logical system in sap pi7.0

0 Answers   IBM,


How to know we are in home page of a web application using QTP

0 Answers   HCL,


what do u mean by html

5 Answers   Infosys,


Given an array of size n. It contains numbers in the range 1 to n. Each number is present at least once except for 1 number. Find the missing number

0 Answers   Amazon,


Number of null pointers in any binary tree

5 Answers   Infosys,


can we extend a class having only one parameterised constructor.Suggest the process to do it.

0 Answers   Zensar,


What language / script is used to validate web page

3 Answers  


what is the difference between set and append?

3 Answers   ICICI,


1. Consider the following input and generate the object code using single pass assembler. JOHN START 0 USING *,15 L 1,FIVE A 1,FOUR ST 1,TEMP FOUR DC F’4’ FIVE DC F’5’ TEMP DS ‘F END

0 Answers   Wipro,


An image map is a collection of

1 Answers   Velocis,


How to call static method in Java?

2 Answers   Epoch,


Categories