Skip to content

Latest commit

 

History

History
30 lines (21 loc) · 901 Bytes

README.md

File metadata and controls

30 lines (21 loc) · 901 Bytes

Queues

Linked List Instantiation

Queue<String>() mylinkl = new LinkedList<>()

Priority Queue Instantiation of String Type

Queue<String>() mylinkl = new Priority Queue<>()

Priority Queue Instantiation of Integer Type

Queue<Integer>() mylinkl = new Priority Queue<>()
Start Method Output
add [] .add("Hello"); ["Hello"]
element ["Hello"] .element() Hello
peek ["Hello", "Hi"] .peek() Hello
pole ["Hello", "Hi"] .pole() Hello
remove ["Hello", "Hi"] .remove("Hi") ["Hello"]
size [“Hello”, “Hi”] .size() 2