Skip to content

Commit 5aa5ba0

Browse files
committed
feat: Add solution for LeetCode problem 217 Contains Duplicate
1 parent df37585 commit 5aa5ba0

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
//
2+
// 217. Contains Duplicate.swift
3+
// https://leetcode.com/problems/contains-duplicate/description/
4+
// Algorithm
5+
//
6+
// Created by 홍승현 on 2024/04/26.
7+
//
8+
9+
import Foundation
10+
11+
final class LeetCode217 {
12+
func containsDuplicate(_ nums: [Int]) -> Bool {
13+
Set(nums).count != nums.count
14+
}
15+
}

0 commit comments

Comments
 (0)