AlgoPlusAlgoPlus
AlgoPlus//web / search-engine
Read the theory

Search Engine

How a search engine finds pages and orders them — crawl the web, build an inverted index, then rank the matches with PageRank.

Phase
Legend
Discovered / active
Link between pages
AI Tutor Workspace
In a nutshell
A search engine can't read the whole web each time you search, so it prepares in advance. A crawler starts at one page and follows links from page to page, discovering them all. It then builds an inverted index: a table mapping each word to the pages that contain it, so a query is answered by reading one row. The matching pages are ordered by relevance plus importance, where PageRank rates a page as important when many important pages link to it. The result is the ranked list you see.
Ready
Press play to begin the cinematic walkthrough.
A search engine does the hard work before you ever search: a crawler follows links to find pages, an inverted index files every word against the pages that use it, and PageRank scores which pages matter most. Your query is then just a lookup plus a sort.
Key terms
Go deeper in the lesson
Read the full theory, intuition & complexity for Search Engine.