diff --git "a/[Programmers]/gyyang/hash/\354\231\204\354\243\274\355\225\230\354\247\200\353\252\273\355\225\234\354\204\240\354\210\230.js" "b/[Programmers]/gyyang/hash/\354\231\204\354\243\274\355\225\230\354\247\200\353\252\273\355\225\234\354\204\240\354\210\230.js" new file mode 100644 index 0000000..41dc5b0 --- /dev/null +++ "b/[Programmers]/gyyang/hash/\354\231\204\354\243\274\355\225\230\354\247\200\353\252\273\355\225\234\354\204\240\354\210\230.js" @@ -0,0 +1,9 @@ +function solution(participant, completion) { + participant.sort(); + completion.sort(); + for(let i = 0; i < participant.length; i++){ + if(participant[i] !== completion[i]){ + return participant[i] + } + } +} \ No newline at end of file diff --git "a/[Programmers]/gyyang/hash/\355\217\254\354\274\223\353\252\254.js" "b/[Programmers]/gyyang/hash/\355\217\254\354\274\223\353\252\254.js" new file mode 100644 index 0000000..d35616c --- /dev/null +++ "b/[Programmers]/gyyang/hash/\355\217\254\354\274\223\353\252\254.js" @@ -0,0 +1,5 @@ +function solution(nums) { + const set = new Set(nums); + const choice = nums.length / 2; + return set.size > choice? choice : set.size +} \ No newline at end of file