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.
mateochr/Stack-and-Queue-structures
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|