What is the average number of comparisons needed in a
sequential search to determine the position of an element in
an array of 100 elements, if the elements are ordered from
largest to smallest?

Answer Posted / dj

Answer is log n (base 2), Maximum camparision required to
search the array of 100 elments is 8. ( modified binary
search)

Is This Answer Correct ?    10 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the term tail recursion?

543


What is the use of bubble sort?

520


Does hashmap preserve insertion order?

474


What is the two-dimensional array?

535


What is a map in programming?

437






Why is hashmap faster than arraylist?

524


Is red black tree balanced?

500


Can a null element added to a treeset or hashset?

461


What are b tree keys?

447


What is the use of placement new?

582


Can a tree be empty?

482


What is unmodifiable list?

511


What is sort order?

488


What is shell sort in data structure?

473


What is linear-logarithm chasm?

537