Skip to content

Commit c75f0f1

Browse files
committed
refactor: use Set interface instead of HashSet for variable declaration
1 parent bacf40e commit c75f0f1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

contains-duplicate/taekwon-dev.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ class Solution {
77
* - 데이터 순서 보장 필요 없음
88
*/
99
public boolean containsDuplicate(int[] nums) {
10-
HashSet<Integer> set = new HashSet<>();
10+
Set<Integer> set = new HashSet<>();
1111
for (int num: nums) {
1212
if (set.contains(num)) {
1313
return true;

0 commit comments

Comments
 (0)