Chris Wellons personal blog

Solving “Two Sum” in C with a tiny hash table

I came across a question: How does one efficiently solve Two Sum in C? There’s a naive quadratic time solution, but also an amortized linear time solution using a hash table. Without a built-in or standard library hash table, the latter sounds onerous. However, a mask-step-index table , a hash table construction…
Points
115
HN comments
45
Submissions
1
Cited by
0 commenters

Software EngineeringMath & Algorithms2023

On Hacker News

SubmittedTitle on HNPointsComments
Jun 27, 2023Solving “Two Sum” in C with a tiny hash table by ingve11545

More from Chris Wellons

All 75 posts →

Related posts from the same era