in the browsers like chrome and mozilla, when we type "F" it automatically fills the url as "facebook.com", how it works, what is this concept, I want to learn this, can anyone help me by suggesting some links here
A more efficient solution is to use a prefix tree (a trie) to store prefixes of words. That's also how spellcheck systems (such as that found in MS Word, etc) usually work.