Search Algorithm
overview
Summary
A search_algorithm locates a target in a collection. linear_search checks items one by one. binary_search repeatedly halves a sorted_data range. Remember time_complexity and space_complexity: how long it runs and how much memory it uses. For graphs and trees, bfs explores level by level, and dfs goes deep along a path. A heuristic method like a_star guides search using costs. Choose methods that match data type, size, and whether the input is sorted.