public class IIntQueue extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
IIntQueue.Entry
innner Entry node class
|
| Constructor and Description |
|---|
IIntQueue() |
| Modifier and Type | Method and Description |
|---|---|
int |
deQueue()
remove the node from the head
and you should make sure the size is larger than 0 by calling size()
before you invoke the method or you will just get -1
|
boolean |
enQueue(int data)
append a int from the tail
|
int |
size()
get the size of the queue
|
public boolean enQueue(int data)
data - public int deQueue()
public int size()
Copyright © 2017. All Rights Reserved.