First Unique Character:Count Once, Then Walk for the First One
Count frequencies, then return the first index whose count is 1. Nested uniqueness scans are honest and quadratic.
Read More9 questions
Count frequencies, then return the first index whose count is 1. Nested uniqueness scans are honest and quadratic.
Read MoreA HashSet of seen sums proves you are looping, not still searching for 1. An unbounded digit-square walk hangs on the unhappy cycle; Floyd is the space follow-up.
Read MoreMagazine letter counts must cover the note. Nested scratch-and-scan is honest and quadratic; anagram equality is the wrong test.
Read MoreA bijection between pattern letters and words. Nested consistency scans are honest and quadratic; a one-way map lets two letters share a token.
Read MoreO(1) get and put need a HashMap to the node plus a doubly linked recency list. Scanning pairs to move-to-end is correct and linear.
Read MoreA HashSet cannot pick a uniform member in O(1). Pair an ArrayList with a value-to-index map so delete can swap-with-last and getRandom is an index.
Read MoreCount windows that sum to k by hashing how often each prefix appeared. Nested i..j is honest and quadratic; a sliding window fails the moment a refund is legal.
Read MoreTimestamps arrive in order per key, so set is an append and get is a rightmost stamp still legal at t. Scanning that history is honest and too slow.
Read MoreHashMap counts plus a size-k min-heap beat nested next-hottest scans. Bucket sort is the O(n) follow-up, not the usual board default.
Read MoreNo hard questions for Hash Tables yet.
Representation and operations — not the problem set.