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 / amit
(n+1)/2
here n= 100
so (100+1)/2
then 50.5 answer
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
How to traverse data in a linked list in forward and backward direction, write the algorithm?
How do you find the height of a binary tree?
Which type of sorting is best?
What are the operations that can be performed on a stack?
Which is better selection or bubble sort?
Draw the B-tree of order 3 created by inserting the following data arriving in sequence – 92 24 6 7 11 8 22 4 5 16 19 20 78
What are the advantages of merge sort?
What is map entry?
What is modcount in hashmap?
Tell me what should be done in the base case for this recursive problem?
What is an array vs list?
Is treemap synchronized?
What do you mean by the term “percolate up”?
What is minimum depth of binary tree?
Explain the most efficient method to reverse a linked list?