| about | help | code help+videos | done | prefs |
containsDuplicate
Given an int[], return true if any value appears more than once, false if all values are unique. Use a HashSet add each value and check if it was already present. Stop as soon as you find the first duplicate. containsDuplicate([1, 2, 3, 1]) → true containsDuplicate([1, 2, 3, 4]) → false containsDuplicate([1, 1]) → true ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Copyright Nick Parlante 2017 - privacy