전체 글156 자바스크립트로 구현한 Tree, BFS, DFS 자바스크립트로 구현한 Tree, BFS, DFSTreeclass Node{ constructor(data){ this.data = data; //노드의 정보 this.children = []; // 자식'노드'가 들어있는 배열 } addChild(data){ this.children.push(new Node(data)); } removeChild(data){ this.children = this.children.filter(child => child.data === data ? false: true); }}class Tree{ constructor(){ this.root = null; // root도 노드.. 2022. 3. 12. 자바스크립트로 구현한 Max Heap 자바스크립트로 구현한 Max Heap 힙(heap)은최댓값 및 최솟값을 찾아내는 연산을 빠르게 하기 위해 고안된완전이진트리(complete binary tree)를 기본으로 한 자료구조(tree-based structure)다. 힙에는 두가지 종류가 있으며,부모노드의 키값이 자식노드의 키값보다 항상 큰 힙을 '최대 힙',부모노드의 키값이 자식노드의 키값보다 항상 작은 힙을 '최소 힙'이라고 부른다.출처 : https://ko.wikipedia.org/wiki/%ED%9E%99_(%EC%9E%90%EB%A3%8C_%EA%B5%AC%EC%A1%B0) 힙 (자료 구조) - 위키백과, 우리 모두의 백과사전1부터 100까지의 정수를 저장한 최대 힙의 예시. 모든 부모노드들이 그 자식노드들보다 큰 값을 가진다. .. 2022. 3. 12. 자바스크립트로 구현한 hash table 자바스크립트로 구현한 hash tablehash table키를 값에 매핑할 수 있는 구조인, 연관 배열 추가에 사용되는 자료 구조이다. 해시 테이블은 해시 함수를 사용하여 색인(index)을 버킷(bucket)이나 슬롯(slot)의 배열로 계산한다.출처 : https://ko.wikipedia.org/wiki/%ED%95%B4%EC%8B%9C_%ED%85%8C%EC%9D%B4%EB%B8%94 해시 테이블 - 위키백과, 우리 모두의 백과사전 ko.wikipedia.orgclass HashTable{ constructor(table_length){ this.table = new Array(table_length); this.size = 0; } _hash(key){ .. 2022. 3. 11. 단일연결리스트로 구현한 Stack, Queue 단일연결리스트로 구현한 Stack, QueueStackfirst in first out// 단일연결리스트로 구현한 stackclass Node{ constructor(value, next){ this.value = value; this.next = next; }}class Stack{ _size = 0; constructor(){ this.head = null; // 가장 위에 있는(가장 나중에 있는) 노드 this._size = 0; } get size(){ return this._size; } push(value){ const new_node = new Node(value, this.. 2022. 3. 10. user story user story user story 란?소프트웨어 개발 및 제품 관리에서 소프트웨어 시스템 기능에 대한 비공식적인 자연 언어 설명입니다.최종 사용자 또는 시스템 사용자의 관점에서 작성되며색인 카드, 포스트잇 메모에 기록되거나 프로젝트 관리 소프트웨어에서 디지털 방식으로 기록될 수 있습니다.스토리는 사용자가 달성하고자 하는 것과 달성하고자 하는 이유를 명확하게 보여줍니다.https://en.wikipedia.org/wiki/User_story User story - WikipediaFrom Wikipedia, the free encyclopedia Jump to navigation Jump to search Informal description of one or more features of a sof.. 2022. 3. 2. flex-basis flex-basis flex의 item 요소 속성 중 flex-basis에 대해 정리해 본다.flex-basis를 제대로 알게되면 반응형을 의도 대로 정확하게 구현할 수 있다. flex-basis 값에 따라(auto, 0, 단위값)flex item 요소의 크기가 어떻게 결정되는지아래의 예제를 보자. See the Pen flex test by sunghee (@dimorin) on CodePen. 출처 : https://heropy.blog/2018/11/24/css-flexible-box/ CSS Flex(Flexible Box) 완벽 가이드많은 경우 float, inline-block, table 등의 도움을 받아서 수평 레이아웃을 구성하지만 이는 차선책이며, 우리는 Flex(Flexible .. 2022. 2. 7. 이전 1 ··· 20 21 22 23 24 25 26 다음