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 cd99fcb commit 8377a45Copy full SHA for 8377a45
contains-duplicate/Tessa1217.java
@@ -3,6 +3,10 @@
3
4
class Solution {
5
6
+ /** 217. 중복된 수
7
+ * 정수 배열 nums가 주어졌을 때 배열 요소 중 한 개 이상이 두 번 이상 중복되어
8
+ * 나타는 경우 true를, 모든 배열의 요소가 고유한 경우 false를 반환
9
+ */
10
public boolean containsDuplicate(int[] nums) {
11
12
Set<Integer> distincts = new HashSet<>();
@@ -14,3 +18,4 @@ public boolean containsDuplicate(int[] nums) {
14
18
return distincts.size() != nums.length;
15
19
}
16
20
21
+
0 commit comments