Data Structures - Java
Homework Assignments 2002-2003
- Write a class "teacher" which creates several objects of the class
"studentlist"
each having the methods to add students, grades , find students and print
their grades.
- Write a FIFO (queue) implemented via a linked list. It should handle nodes
containing some comparable data. It should have methods push and pop.
- Write a LIFO (stack) implemented via a linked list. It should have a
maximum number of elements and it should handle nodes
containing some comparable data. It should also have methods push and pop.
- Write a doubly linked sorted linked list. The nodes should be as above.
Also have methods insert, deleted, find_node and print_list.
- Use the abstract key-word to create a generic FIFO capable of storing
Objects of different types
- Write a binary sorted tree capable of sorting generic nodes (as in the
above FIFO) using a method return_comparable_data.
- Write a recursive method to find a node in the above binary tree
using (1) postordertraversal (2)preordertraversal and (3) inordertraversal (see exercise 19.23)
- write a function to delete a node from the tree (see in book exercise 19.22)
- Write your own simple compiler using a stack to store operations(see exercise 19.26 - 19.27)
- Write an algorithm for balancing an unbalanced tree.