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 / wonder
Avarage number of comparision will be (N+1)/2(N-size of
array).
Because:If elements is in 1st position no of cpmparision
will be one and if the element is in the last position then
no of comparisions will be N.
| Is This Answer Correct ? | 31 Yes | 0 No |
Post New Answer View All Answers
Can array store heterogeneous data?
What type of algorithm is binary search?
What are arrays used for?
What is bubble sort and quick sort?
Which sorting is used in collections sort?
What is array sort?
Why would we use dynamically allocated arrays vs vectors?
What is the difference between null and void?
What is the difference between sorting and classifying?
What are the properties of an algorithm?
What are different types of sorting algorithms?
What is the best complexity of bubble sort?
How many sorting are there in data structure?
What is the complexity of sorting algorithm?
Which interfaces are implemented by printerstatereasons?