본문 바로가기

자료구조

Java를 이용한 Circular Deque 구현 이번에는 Java를 이용하여 원형 데크를 구현하는 Design Circular Deque 실습이다. Design Circular Deque - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 데크(Deque)는 큐(Queue)와 비슷하지만 양쪽 모두(head, tail)에서 삽입, 삭제 연산이 가능한 자료구조다. 즉 끝이 두 개(double-ended)인 큐이기 때문에 deque라고 한다. 그럼 원형 데크는 이전에 구현했던 원형 큐처럼 제한된 크기로 설정된 데크라.. 더보기
Java를 이용한 Stack 실습 LeetCode의 Queue, Stack 실습 중 Stack 부문을 읽고 작성하는 포스트다. Explore - LeetCode LeetCode Explore is the best place for everyone to start practicing and learning on LeetCode. No matter if you are a beginner or a master, there are always new topics waiting for you to explore. leetcode.com 자바에서는 Stack이라는 클래스로 Stack, 스택 자료구조를 제공하고 있다. 자료구조를 공부했다면 못 들어봤을 수가 없는 대표적인 Last-In-First-Out 자료구조인 스택은 이전의 Queue와 달리 같은.. 더보기
Java를 이용한 Circular Queue 구현 이 포스트는 LeetCode에서 Queue, Stack 튜토리얼을 읽으면서 배운 내용을 기록하고 있다. Explore - LeetCode LeetCode Explore is the best place for everyone to start practicing and learning on LeetCode. No matter if you are a beginner or a master, there are always new topics waiting for you to explore. leetcode.com Queue Queue, 큐는 대표적인 FIFO 자료구조로 Stack과 더불어 유명한 선형 자료구조다. FIFO는 말 그대로 First-In-First-Out으로 먼저 자료구조에 삽입된 데이터가 먼저 자료.. 더보기