The aim of this assignment is to implement and manipulate the basic operations related to Singly linked list, Doubly linked list and binary search tree data structures.

Assume that file1.txt and file2.txt contain unknown number of strings (text format). Write a Java program that prints out all the strings that are in file1.txt but not in file2.txt in an ascending order. Pseudo algorithm to do this task:

  • Read the strings/names in file1.txt and insert them into a doubly linked list.
  • Read the strings/names in file2.txt and insert them into a singly linked list.
  • Scan the singly linked list and for each string:
    • Remove all occurrences of this string from the doubly linked list.
  • Insert all the items in the doubly linked list into the binary search tree.
  • Print out all the elements in the binary search tree in an ascending order (in-order) – five strings per line.
  • Print out the height of the tree
Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.