LeetCode 170 - Two Sum III - Data structure design
LeetCode Problem 170 Difficulty: 🟢 Easy Topics: Array, Hash Table, Two Pointers, Design, Data Stream Solution Problem Understanding The problem asks us to design a data structure that supports two operations efficiently over a stream of integers. The first operation, add(number) , inserts a number into the data structure. Numbers may appear multiple times, so duplicates must be handled correctly. The second operation, find(value) , checks whether there exists any...