English 中文(简体)
DSA using Java - Search techniques
  • 时间:2024-12-22

DSA using Java - Search techniques


Previous Page Next Page  

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.NoTechnique & Description
1Linear Search

Linear search searches all items and its worst execution time is n where n is the number of items.

2Binary Search

Binary search requires items to be in sorted order but its worst execution time is constant and is much faster than pnear search.

3Interpolation Search

Interpolation 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 pnear search.

Advertisements