Search Algorithm
An algorithm for finding an item with specified properties among a collection of items.
Search algorithms are designed to retrieve information from various data structures. They range from simple linear search (checking every item) to highly efficient binary search (in sorted data) and graph search algorithms like BFS and DFS for complex networks.
graph LR
Center["Search Algorithm"]:::main
Rel_sorting_algorithm["sorting-algorithm"]:::related -.-> Center
click Rel_sorting_algorithm "/terms/sorting-algorithm"
Rel_recursion["recursion"]:::related -.-> Center
click Rel_recursion "/terms/recursion"
classDef main fill:#7c3aed,stroke:#8b5cf6,stroke-width:2px,color:white,font-weight:bold,rx:5,ry:5;
classDef pre fill:#0f172a,stroke:#3b82f6,color:#94a3b8,rx:5,ry:5;
classDef child fill:#0f172a,stroke:#10b981,color:#94a3b8,rx:5,ry:5;
classDef related fill:#0f172a,stroke:#8b5cf6,stroke-dasharray: 5 5,color:#94a3b8,rx:5,ry:5;
linkStyle default stroke:#4b5563,stroke-width:2px;
🧠 Knowledge Check
🧒 Explain Like I'm 5
Searching is like looking for a specific Lego brick in a massive box. You could look through every single brick, or if the box is organized, you can jump straight to the section where that type of brick is kept.
🤓 Expert Deep Dive
Heuristic-based search (like A*) is essential for pathfinding in AI and games. Information retrieval systems use inverted indices to perform full-text search across billions of documents in milliseconds. Vector search using cosine similarity is the new standard for semantic AI discovery.