diff --git a/HyeonWook/DFS&BFS/banUsers b/HyeonWook/DFS&BFS/banUsers new file mode 100644 index 0000000..1d529bb --- /dev/null +++ b/HyeonWook/DFS&BFS/banUsers @@ -0,0 +1,38 @@ +function solution (user_id, banned_id) { + + let banLists = []; + + //배열을 DSF 탐색 + function DSF(users, bIds, bans){ + if(bIds.length === 0) { + banLists.push(bans) + + return; + } + + for(let i =0; i JSON.stringify(list.sort())) + + return Array.from(new Set(...[banLists])).length + + // for문으로 문자열 일치 판별 + function match(idA, idB){ + if(idA.length !== idB.length) return false; + for(let i =0; i