하얀성의 개발 메타인지

  • 홈
  • 태그
  • 방명록

📈알고리즘/자료구조(js) 2

Queue 최적화, 원형 큐

Queue Optimised 이전과 달리 items를 객체{}로 선언해주었다. class Queue { constructor() { this.items = {} this.rear = 0 this.front = 0 } enqueue(element) { this.items[this.rear] = element this.rear++ } dequeue() { const item = this.items[this.front] delete this.items[this.front] this.front++ return item } isEmpty() { return this.rear - this.front === 0 } peek() { return this.items[this.front] } size() { return ..

📈알고리즘/자료구조(js) 2023.03.20

js 자료구조(1)[Stack, Queue]

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 class Stack { constructor() { this.items = [] } push(element) { this.items.push(element) } pop() { return this.items.pop() } peek() { return this.items[this.items.length -1] } isEmpty() { return this.items.length === 0 } size() { return this.items.length } print() { console.log(th..

📈알고리즘/자료구조(js) 2023.03.16
1
더보기
프로필사진

Miracle programming

  • 분류 전체보기 (669)
    • Web App Project (32)
    • 🗃️javascript (14)
      • 프로그래머스 (169)
      • 코테 프레임 문제 (33)
      • 이론정리 (27)
      • DOM 조작 (7)
      • 프로젝트 (22)
    • 🪁react (60)
      • react 이론정리 (21)
      • react 실습 (33)
      • 바닐라 js 실습 (6)
    • 🪃next (0)
      • next 이론 정리 (0)
      • next 실습 (0)
    • 🪢node (20)
      • node 이론 정리 (16)
      • node 실습 (4)
    • 🚧typeScript (4)
      • typeScript 이론정리 (4)
    • 🔓데이터베이스 (33)
      • SQL (23)
      • 쇼핑몰 프로젝트 (6)
      • 몽고db (4)
    • 📋CS (22)
      • 컴퓨터 구조 및 운영체제 (3)
      • 네트워크 이론 (11)
      • 기초질문 (8)
    • 📟java (58)
      • 백준 (34)
      • 개발 이론정리 (9)
      • JSP, Servlet (11)
    • 📈알고리즘 (32)
      • 알고리즘 (30)
      • 자료구조(js) (2)
    • 📚HTML, CSS (26)
      • 이론 정리 (16)
      • 실습 및 프로젝트 (10)
    • 📊python (22)
      • 파이썬, 데이터분석 (22)
    • 🗄️git (8)
    • 🏝️AWS (3)
    • 📐선형대수학 (8)
      • 선형대수학 (4)
      • 수1, 수2, 미적분 (4)
    • 개인 수필 (29)
    • 정보 (22)
    • 공부 계획, 선배님 피드백 정리 (12)

Copyright © Kakao Corp. All rights reserved.

티스토리툴바