We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8901b1d commit 9ea365dCopy full SHA for 9ea365d
contains-duplicate/wonYeong.java
@@ -0,0 +1,10 @@
1
+class Solution {
2
+ public boolean containsDuplicate(int[] nums) {
3
+ Arrays.sort(nums);
4
+ for(int i = 0; i < nums.length - 1; i++) {
5
+ if(nums[i] == nums[i+1])
6
+ return true;
7
+ }
8
+ return false;
9
10
+}
0 commit comments