logoalt Hacker News

eqvinox • 12/09/2024 • 1 reply • view on HN

> Finally, deletes are hard in hash maps.

Deletes are hard in open hash maps like here; they're trivial in chained hash maps.

(I'm only posting this because this seems to be an exercise/learning-ish HN post and I think it's a relevant point to not forget.)


Replies

teo_zero • 12/09/2024

Right.

Thinking about it, I don't grasp why the author has opted for linear probing here. Given the amount of malloc(), they might have used linked lists as well.

➕ show 1 reply