0217 Contains Duplicate
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
Backlinks (1)
Comments (0)