Description
PRG/421 Week 2 Java 2.15 LAB: Inventory (linked lists: insert at the front of a list)
Given main() in the Inventory class, define an insertAtFront() method in the InventoryNode class that inserts items at the front of a linked list (after the dummy head node).
Ex. If the input is:
4
plates 100
spoons 200
cups 150
forks 200
the output is:
200 forks
150 cups
200 spoons
100 plates
Reviews
There are no reviews yet.