Complete the code to show which data structure is commonly used for autocomplete.
The data structure used for autocomplete is called a [1].
A trie is a tree-like data structure that stores strings and is efficient for prefix-based searches, making it ideal for autocomplete.
Complete the sentence to explain a common method used in spell checkers.
Spell checkers often use [1] to find words that are close in spelling to the input word.
Edit distance measures how many changes are needed to convert one word into another, helping spell checkers suggest correct words.
Fix the error in the explanation about IP routing.
IP routing uses [1] tables to decide where to send data packets next.Routing tables store information about paths to different network destinations, guiding data packets efficiently.
Fill both blanks to complete the sentence about autocomplete and spell check.
Autocomplete uses a [1] to store words, while spell check uses [2] to measure word similarity.
Autocomplete relies on a trie for fast prefix searches, and spell check uses edit distance to find words close in spelling.
Fill all three blanks to complete the explanation about IP routing and data structures.
IP routing uses [1] tables to find the best path, which often use [2] for fast lookup and [3] to handle multiple possible routes.
IP routing relies on routing tables that use hashing for quick address lookup and priority queues to manage and select the best routes among many.