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 / abhishek chakladar
though average number of comparison of sequential search is (N+1)/2 then in the question N=100 so that the answer will be (100+1)/2
=101/2
=50.5
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is difference between hashmap and map?
How do you clear a stack?
Is arraylist reference type?
What is difference between data type and variable?
Explain the sorting algorithm that is most suitable to be used with single linked list?
What is array in data structure with example?
What are the advantages of sorting and filtering data?
Explain Stack
How do you find the space complexity of a bubble sort?
write an algorithm to show the procedure of insertion into a b-tree?
Why is arraylist not thread safe?
What do you mean by level of the tree?
What do you understand by stable sort?
What is data structure and its operations?
Which is faster array or arraylist?