% Linked Lists and Stacks
Due date: thursday 29/6.
1. Linked Lists
-
Reimplenent Program P3.2 in PythonTutor. Again, modify it so that it creates a linked list of 5 nodes and contains random values. Also the program shall not print anything to standard output.
-
Modify the previous program by implementing a function
reverse
that reverses the nodes of the linked list; use it in themain
function on the existing linked list. Add a functionfreeLL
that frees the memory occupied by the linked list;
2. Stacks
- Reimplement Program 4.2 (Stack implemented with a Linked List) in PythonTutor, adapting it the same way as we dit for the previous programs.