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 / tej pratap

it should be (100+1)/2.

Is This Answer Correct ?    12 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is link list in data structure?

467


For searches. Which one is most preferred: array list or linked list?

545


What exactly is a thread?

466


Why is hashing used?

458


How does a dynamic array work?

447






Does hashmap preserve insertion order?

475


Different Types of pattern?

556


Differentiate between push and pop?

669


Explain the term run-time stack?

618


How do you implement a stack?

476


Treemap orders the elements on which field?

514


Is learning data structures necessary?

457


What is a directed graph?

546


Why is tuple immutable?

446


How do you find the number of comparisons in bubble sort?

509