Skip to content

Commit 6ca51f3

Browse files
authored
Create Solution.java (Tahanima#93)
1 parent 1496744 commit 6ca51f3

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
class Solution {
2+
public boolean containsDuplicate(int[] nums) {
3+
Arrays.sort(nums);
4+
5+
for (int i = 1; i < nums.length; i++) {
6+
if (nums[i] == nums[i - 1])
7+
return true;
8+
}
9+
10+
return false;
11+
}
12+
}

0 commit comments

Comments
 (0)