Data Structures - Java

Homework Assignments 2002-2003

  1. 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.
  2. Write a FIFO (queue) implemented via a linked list. It should handle nodes containing some comparable data. It should have methods push and pop.
  3. 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.
  4. Write a doubly linked sorted linked list. The nodes should be as above. Also have methods insert, deleted, find_node and print_list.
  5. Use the abstract key-word to create a generic FIFO capable of storing Objects of different types
  6. Write a binary sorted tree capable of sorting generic nodes (as in the above FIFO) using a method return_comparable_data.
  7. 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)
  8. write a function to delete a node from the tree (see in book exercise 19.22)
  9. Write your own simple compiler using a stack to store operations(see exercise 19.26 - 19.27)
  10. Write an algorithm for balancing an unbalanced tree.