Java - Data structure - Queue/Stack

Queue

First in First out

.add 

.remove / .poll (get the first element)

.peek  (check the first element but not take it)



Stack

Lsat in First out

.push

.search (Return int)

.remove / .pop(get the first element)

.peek  (check the first element but not take it)


留言

此網誌的熱門文章

MAP - Sort with stream

JAVA - DSF Example