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 / sabir

(n+1)/2

Is This Answer Correct ?    13 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the logic to reverse the array?

477


List the data structures which are used in network data modal.

476


Are duplicates allowed in hashmap?

485


Difference between arrays and linked list?

541


Why does hashset use hashmap?

448






“int a[] = new int[3]{1, 2, 3}” – This a legal way of defining the arrays?

702


Define in brief an array. What are the types of array operations?

650


What do you understand by doubly linked list?

498


How can we delete any specific node from the linked list?

497


Explain the term binding time?

539


Which is faster hashmap or hashtable?

509


How do you clear a stack?

518


What is b tree in data structure?

479


How is a hashset implemented?

466


Is file a data structure?

472