Skip to content

Latest commit

 

History

History
5 lines (2 loc) · 513 Bytes

File metadata and controls

5 lines (2 loc) · 513 Bytes

Stack-and-Queue-structures

There are two interfaces, StringStack.java and IntQueue.java which define basic methods for a stack (LIFO) and a queue (FIFO), with data of types of String and int respectivly. Both implementations were made with a singly linked list and all actions of inserting or removing require O(1) complexity. If the stack or the queue is empty the functions that read from the structure throw exception of type NoSuchElementException. ListNode.java is common for both projects.