Skip to content
bradendubois edited this page Jun 9, 2021 · 8 revisions

No Duplicates

ID: nodup

Difficulty: 1.4

CPU Time: 1 second

Memory: 1024 MB

Solution

One can loop through the words given, and keep a map of the word to the number of its occurrences: if the occurrence of the word reached is already 1 (or is > 1, depending on when you check it), then it is a repeat.

Clone this wiki locally