The element being searched for is not found in an array of
100 elements. What is the average number of comparisons
needed in a sequential search to determine that the element
is not there, if the elements are completely unordered?
Answer Posted / mounesh badiger
we have to check all the elements of the array.so average is
n(size of array)
Is This Answer Correct ? | 14 Yes | 3 No |
Post New Answer View All Answers
How efficient is binary search?
Does linkedhashset allow duplicates?
an array of size N in which every number is between 1 and N, determine if there are any duplicates in it. You are allowed to destroy the array if you like. [ I ended up giving about 4 or 5 different solutions for this, each supposedly better than the others ].
what is a balanced tree.
Can we store null in arraylist?
How is the front of the queue calculated ?
What is a matrix?
Why do we use stacks?
What is homogeneous array?
Which are the sorted collections?
Why concurrenthashmap is fail safe?
What is complete binary tree and almost complete binary tree?
Describe the complexity of Quick Sort
What is the purpose of tochararray ()?
Briefly explain recursive algorithm 50 how do you search for a target key in a linked list?