링버퍼

링버퍼를 사용하면 디큐(deque)시 발생하는 요소 이동 문제를 해결할 수 있다. 2021/01/05 - [분류 전체보기] - 자바(JAVA)로 큐(Queue) 구현하기 public class IntQueue { private int max; private int num; private int[] que; private int front; private int rear; // 예외 : 큐가 비어 있음 class EmptyIntQueueException extends RuntimeException{ } // 예외 : 큐가 가득 참 class OverflowIntQueueException extends RuntimeException{ } public IntQueue(int capacity){ num = fr..
깡냉쓰
'링버퍼' 태그의 글 목록