0217 Contains Duplicate
Warning
Over a year old. May be outdated
Solved at: 230129
Question
Given an integer array nums, return true if any value appears at least twice in the array, and return false if every element is distinct.
Solution
Results
- Runtime 642 ms Beats 44.57%
- Memory 19 MB Beats 10.85%
Complexity Analysis
Both
Takeaways
Using sorting can sacrifice time to and pull down space into
Backlinks1
Coding Tests