Ir para o conteúdo principal
0

Por enquanto, esta lição está em inglês.

One jump instead of a scan

Linear search checks items one by one. A hash map jumps straight to the answer, in about the same time for ten items or ten million. Python's dict and set are hash maps, and they turn many O(n²) problems into O(n).