AI engineering glossary · Data structures algorithms

What is collision?

Collision (also called hash collision): The situation where two different keys are mapped to the same slot by a hash function. Since slots are fewer than possible keys, collisions are unavoidable and every hash table needs a strategy to resolve them.

Level: intermediateTopic: Data structures algorithms

Collision: an example

With 8 slots, keys 'cat' and 'act' are anagrams and would land in the same slot if the function only adds character codes.

Related terms

More Data structures algorithms terms

Where you learn it

Collision is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.