[자료구조(Data Structure)] - 6. Linked Queue
1. Linked Queue 동작 로직
a. 삽입(push)
b. 인출(pop)
2. Linked Queue ADT
abstract interface Queue{ abstract void Push( Object x ); abstract Object pop(); abstract boolean isEmpty(); }
|
Queue Interface ADT |
public Object getData() public LinkedNode getNext() |
LinkedNode ADT |
3. 코드 구현
abstract interface Queue{ abstract void Push( Object x ); abstract Object pop(); abstract boolean isEmpty(); } |
class LinkedNode{
public Object getData() public LinkedNode getNext() |
class LinkedQueue implements Queue{ private LinkedNode front; newNode.setData( x );
if( isEmpty() ) }
public Object pop(){
public Object peak(){ }
public boolean isEmpty(){ } } } |
queue.pop(); } |
LinkedQueueProgram.java |
'공부(Study) > 자료구조(Data Structure)' 카테고리의 다른 글
[자료구조(Data Structure)] - 5. Circular Queue with Array (10) | 2015.04.26 |
---|---|
[자료구조(Data Structure)] - 4. Circular Linked List - Java (11) | 2015.04.25 |
[자료구조(Data Structure)] - 3. Huffman Tree (10) | 2014.12.29 |
[자료구조(Data Structure)] - 2. Insertion Sort (10) | 2014.11.30 |
[자료구조(Data Structure)] - Partition 기법 - QuickSort (10) | 2014.10.09 |