answersLogoWhite

0


Best Answer

binary search

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the worst case and best case for interpolation search?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the worst case and best case for binary search?

The best case for a binary search is finding the target item on the first look into the data structure, so O(1). The worst case for a binary search is searching for an item which is not in the data. In this case, each time the algorithm did not find the target, it would eliminate half the list to search through, so O(log n).


What is best and average case of binary search?

Merge sort is O(n log n) for both best case and average case scenarios.


What is Efficiency of Binary Search tree operations?

If it is an unbalanced binary tree, O( ln( n ) / ln( 2 ) ) is best-case. Worst case is O( n ). If it is balanced, worst case is O( ln( n ) / ln( 2 ) ).


What is the height of binary search tree in worst case?

In the worst case a binary search tree is linear and has a height equal to the number of nodes. so h=O(h).


What is the worst case and best case time complexity of heapsort?

The best and worst case time complexity for heapsort is O(n log n).


What is best algorithm for searching?

It depends on how the data is arranged. In case it is an array, use linear search or binary search or interpolation search according as the array is sorted or not and based on the distribution of data. If some other data structures are used (like heap) for making data retrieval efficient, other algorithms exist.


What do you mean by worest case and best case?

2 possible outcomes to a situation, worst case being the absolute worst possible outcome, best case being that absolute best possible outcome.


Complexity of linear search?

the compexity of linear search in worst case is f(n) = n+1


Which algorithm has some average worst case and best case time?

All algorithms have a best, worst and average case. Algorithms that always perform in constant time have a best, worst and average of O(1).


What is the difference between best worst and average case complexity of an algorithm?

These are terms given to the various scenarios which can be encountered by an algorithm. The best case scenario for an algorithm is the arrangement of data for which this algorithm performs best. Take a binary search for example. The best case scenario for this search is that the target value is at the very center of the data you're searching. So the best case time complexity for this would be O(1). The worst case scenario, on the other hand, describes the absolute worst set of input for a given algorithm. Let's look at a quicksort, which can perform terribly if you always choose the smallest or largest element of a sublist for the pivot value. This will cause quicksort to degenerate to O(n2). Discounting the best and worst cases, we usually want to look at the average performance of an algorithm. These are the cases for which the algorithm performs "normally."


What is the worst case and best case of bubble sort?

There is no worst case for merge sort. Each sort takes the same amount of steps, so the worst case is equal to the average case and best case. In each case it has a complexity of O( N * log(N) ).


What is average case complexity of binary search?

Average case complexity for Binary search O(log N). (Big O log n)Habibur Rahman (https://www.facebook.com/mmhabib89)BUBT University Bangladeshhttp://www.bubt.edu.bd/