Skip to content

Commit dda82b2

Browse files
committed
feat: 우선순위 큐의 인터페이스 정의
1 parent a0c6971 commit dda82b2

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
package priorityqueue;
2+
3+
/**
4+
* 우선순위 큐 인터페이스
5+
*
6+
* @param <E> 타입 파라미터
7+
*/
8+
public interface PriorityQueue<E> {
9+
10+
/**
11+
* 해당 우선순위 큐가 비어있는지 여부를 반환합니다.
12+
*
13+
* @return 해당 우선순위 큐가 비어있는지 여부
14+
*/
15+
boolean isEmpty();
16+
17+
/**
18+
* 우선순위 큐에 데이터를 저장합니다.
19+
*
20+
* @param data 저장할 데이터
21+
*/
22+
void enqueue(E data);
23+
24+
/**
25+
* 우선순위 큐에서 우선순위가 가장 높은 데이터를 제거합니다.<br>이 메소드는 데이터가 최소 1개 이상 있을 때, 동작합니다.
26+
*
27+
* @return 우선순위가 가장 높은 데이터
28+
*/
29+
E dequeue();
30+
}

0 commit comments

Comments
 (0)