Service-company tests usually give one or two array or string questions with large hidden inputs. The nested-loop answer passes the samples and then times out, so you need the hashing version that runs in one pass. Use this as practice for spotting when a counter in a HashMap replaces the inner loop. Also watch the small details these tests punish, such as an answer that overflows int and needs a long.