Searching

Also known as: search algorithm

process

The process of locating a specific item or value within a collection of data using a systematic strategy. Searching is one of the most common operations in computing.

πŸ’‘ Intuition

Looking for a book on a shelf, a name in a list, a file on your computer.

Core Idea

The best search strategy depends on whether the data is sorted and how large the collection is.

πŸ”¬ Example

Linear search: check each item. Binary search: repeatedly halve the search space.

🎯 Why It Matters

Searching is one of the most common operations in computing.

⚠️ Common Confusion

Binary search requires sorted dataβ€”but is much faster than linear search.

Related Concepts

Prerequisites

How Searching Connects to Other Ideas

To understand searching, you should first be comfortable with array and algorithm. Once you have a solid grasp of searching, you can move on to linear search and binary search.

Go Deeper

Frequently Asked Questions

What is Searching in CS Thinking?

The process of locating a specific item or value within a collection of data using a systematic strategy.

Why is Searching important?

Searching is one of the most common operations in computing.

What do students usually get wrong about Searching?

Binary search requires sorted dataβ€”but is much faster than linear search.

What should I learn before Searching?

Before studying Searching, you should understand: array, algorithm.

πŸ’» Animated Visualization Animated

Compare linear vs binary search strategies