medium10 pts · first answer countshash-mapdesigntwo-sum
Two Sum on a stream of numbers
A class supports add(x) and find(target), which asks whether any two added numbers sum to target. With a count map, what are the costs?
Discussion 0
Join free to post in the discussion.
Related questions
- Average cost of a hash map lookupBackend Developer
- Worst case for a hash map lookupBackend Developer
- Removing duplicates with a SetBackend Developer
- Number keys in a plain objectBackend Developer
- Iteration order of a MapBackend Developer
- When to choose Map over a plain objectBackend Developer
- Set of look-alike objectsBackend Developer
- Counting letters in a wordBackend Developer