Hash Map — Reasoning Check

Apply the module invariants, traces, and boundary conditions.


Get every question correct to pass this checkpoint. You can review feedback, revise your answers, and submit again.

1. An isomorphic-string scan sees its first pair p→q. Both maps are empty. What should it do?

Select one answer.

2. For [8,8] and target 16, a correct single-pass Two Sum routine first finds a pair at which zero-based input index? Enter one integer.
3. A proposed Group Anagrams key is the sum of lowercase byte values. Why is it invalid?

Select one answer.

4. What is the longest consecutive-sequence length in [10,5,6,5,8,9]? Enter one integer.
5. A longest-consecutive implementation builds a set, then loops over the ORIGINAL input. The input has M copies of 1 followed by 2 through M. What performance problem remains?

Select one answer.

6. Can ransom note "baba" be constructed from magazine "aaabbc"? Enter true or false.
Join Discord