Pergunta de entrevista da empresa Abnormal AI

Question about hash collisions, what to do to get around this issue, and then a simple-ish coding exercise implementing the solution.

Resposta da entrevista

Sigiloso

10 de jan. de 2025

Expectations is to reduce the collisions by 100%? if so probably we need to check collided entities again with actual comparisons. Like for hash function below 1 mod 10 = 1 11 mod 10 = 1 1 mod 10 = 1 So both 1 & 11 will be placed in same bucket. And inside this bucket if someone expects all values are equal we will need to check if 1 == 11 vs 1 == 1. Basically exact values match.