title: "JavaScript Structure" excerpt: "Structure by JavaScript" category: JavaScript-Reference tags: [JavaScript, stack, queue, set, map] toc: true toc_sticky: true Structure of JavaScript Stack Array 이용 Stack 처럼 사용 가능 array.push(element) Stack top에 원소 push array.pop() Stack top에 원소 pop array[array.length-1] Stack의 top let stack = [1, 2, 3, 4, 5]; stack.push(6); // [1, 2, 3, 4, 5, 6] stack.pop(..
title: "JavaScript Reference" excerpt: "JavaScript Reference" category: Language-Reference tags: [JavaScript, compare, sort, map, print, stack, queue, set, map, array] toc: true Skills by JavaScript 모든 부분집합 구하기(bit 연산) 모든 부분집합 구하기 bit & 연산 이용 const arr = [1, 2, 3, 4]; const getSet = (arr) => { const totalSet = []; // 결과 Set const totalCount = 1 { let left = 0; let right = array.length; while (le..