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 3fdc206 commit eb02143Copy full SHA for eb02143
โcontains-duplicate/hanseulhee.jsโ
@@ -1,6 +1,12 @@
1
/**
2
* @param {number[]} nums
3
* @return {boolean}
4
+ *
5
+ * ์ ๊ทผ: ์ค์ฒฉ ๋ฐ๋ณต๋ฌธ์ ํตํด ์ค๋ณต์ด ์์ผ๋ฉด true ๋ฐํ, ์ค๋ณต์ด ์์ผ๋ฉด false๋ฅผ ๋ฐํํ๋๋ก ์ค๊ณํ์์ต๋๋ค.
6
+ * ๊ทธ๋ฌ๋ ๋ฐฐ์ด์ ์์๋ฅผ ๋ ๋ฒ ๋๊ธฐ ๋๋ฌธ์ ๋ ํจ์จ์ ์ธ ๋ฐฉ๋ฒ์ผ๋ก ์ค๊ณํ๊ณ ์ ํ์์ต๋๋ค.
7
8
+ * ํด๊ฒฐ: ๋ ํจ์จ์ ์ธ ๋ฐฉ๋ฒ์ผ๋ก ์ค๋ณต ์ฌ๋ถ๋ฅผ ๊ฒ์ฌํ๋ Set์ ์ฌ์ฉํ๊ฒ ๋์์ต๋๋ค.
9
+ * Set์ ํด๋น ์์๊ฐ ์๋ ์ง ํ์ธํ๊ณ ์๋ค๋ฉด true๋ฅผ ์๋ค๋ฉด false๋ฅผ ๋ฐํํ๋๋ก ํ์์ต๋๋ค.
10
*/
11
12
var containsDuplicate = function(nums) {
0 commit comments