Skip to content

Commit 340b621

Browse files
committed
feat: 덱 구현 시작
1 parent b12a629 commit 340b621

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
package deque;
2+
3+
public class LinkedLIstDeque<E> implements Deque<E> {
4+
5+
private int size;
6+
private Node<E> head;
7+
private Node<E> tail;
8+
9+
@Override
10+
public int size() {
11+
return this.size;
12+
}
13+
14+
@Override
15+
public boolean isEmpty() {
16+
return this.size == 0;
17+
}
18+
19+
@Override
20+
public void addFirst(E data) {
21+
22+
}
23+
24+
@Override
25+
public void addLast(E data) {
26+
27+
}
28+
29+
@Override
30+
public E removeFirst() {
31+
return null;
32+
}
33+
34+
@Override
35+
public E removeLast() {
36+
return null;
37+
}
38+
39+
@Override
40+
public E getFirst() {
41+
return null;
42+
}
43+
44+
@Override
45+
public E getLast() {
46+
return null;
47+
}
48+
49+
private static class Node<T> {
50+
51+
private T data;
52+
private Node<T> next;
53+
private Node<T> prev;
54+
55+
public Node(T data) {
56+
this.data = data;
57+
}
58+
}
59+
}

0 commit comments

Comments
 (0)