Searching algorithms
Searching algorithms
Searching algorithms are fundamental in computer science, enabling efficient retrieval of data
from various structures. Over time, numerous algorithms have been developed, each tailored
to specific types of data and search requirements.
1. Linear Search:
• Description: Examines each element in a list sequentially until the target element is found or
the list ends.
2. Binary Search:
• Description: Efficiently searches a sorted list by repeatedly dividing the search interval in
half.
3. Jump Search:
• Description: Involves jumping ahead by fixed steps and then performing a linear search
within a smaller range.
4. Interpolation Search:
• Description: Estimates the position of the target value within a sorted array based on the
value’s proximity to the bounds.
• Time Complexity: O(log log n) in the best case; O(n) in the worst case.
5. Exponential Search:
• Description: Combines binary search with an exponential step to find the range where the
target may exist.
• Use Case: Efficient for unbounded or infinite lists.
1. A Search Algorithm:
• Description: An informed search algorithm that finds the shortest path between nodes using
heuristics to guide its search.
• Use Case: Widely used in pathfinding and graph traversal, such as in AI for games and
navigation systems.
2. Aho–Corasick Algorithm:
• Use Case: Ideal for searching multiple patterns in large texts, such as in intrusion detection
systems and text editors.
• Time Complexity: Linear in the length of the input text plus the number of matches.
References:
https://www.geeksforgeeks.org/searching-algorithms/
https://www.geeksforgeeks.org/a-search-algorithm/
https://www.geeksforgeeks.org/aho-corasick-algorithm-pattern-searching/
https://www.freecodecamp.org/news/search-algorithms-explained-with-examples-in-java-
python-and-c/
https://www.analyticsvidhya.com/blog/2021/09/searching-in-data-structure-different-search-
methods-explained/
https://thetechartist.com/searching-algorithms-overview/
https://www.udacity.com/blog/2020/07/search-algorithms-explained.html