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 / mohit0749
I think it we can apply binary search which requires only logn comparison becoz elements are ordered (largest to smallest).
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
There is a program which inserts and deletes node in a sorted singly linked list. There is a bug in one of the modules, how would you debug it?
Why heap sort is not used?
Explain the term run-time stack?
What is faster array or arraylist?
How do you sort pseudocode?
What are the different types of data structures explain briefly?
What will happen if an array goes out of bounds?
Differentiate between the singly linked list and doubly linked list.
Is binary tree balanced?
What is the height of an empty tree?
Define non-linear data structures?
What is meant by strongly connected in a graph?
Which sorting is best?
What are the advantages of data structure?
How do you balance a tree?