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
What type of algorithm is binary search?
How would you swap the Kth node from beginning with Kth node from end in a Linked List.
Define the term “percolate down”?
What is a map in programming?
Is vector synchronized?
Can we insert null in hashset?
Is it possible to make an array volatile in java?
How does a hashtable work?
Does arraylist have a tostring?
Which sorting is best for large data?
Where will be the free node available while inserting a new node in a linked list?
What is selection sort with example?
Why arraylist is not efficient for manipulation?
What is meant by binary tree traversal?
How do you sort an array by value?