The design of a Search Engine
Introduction First let’s start with a similar problem akin to web search. Imagine you have 100 files in your current directory, and you do something like: 1 grep "Abdul" . The grep program will return you a list of files which contain the given string or pattern. But how do you think does that works under the hood. In a naive approach, the grep program would open each file in the directory, search for the given string/pattern and if any result is obtained, then add this file to the output list. ...