Saltar al contenido principal
0

Por ahora, esta lección está en 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).