Dsa Using Java 简明教程
DSA using Java - Search techniques
搜索是指在项目集合中找到指定属性的所需元素。我们将使用以下常用的简单搜索算法开始我们的讨论。
Search refers to locating a desired element of specified properties in a collection of items. We are going to start our discussion using following commonly used and simple search algorithms.
Sr.No |
Technique & Description |
1 |
Linear SearchLinear search searches all items and its worst execution time is n where n is the number of items. |
2 |
Binary SearchBinary search requires items to be in sorted order but its worst execution time is constant and is much faster than linear search. |
3 |
Interpolation SearchInterpolation search requires items to be in sorted order but its worst execution time is O(n) where n is the number of items and it is much faster than linear search. |