Description
In continuation of the same problem as the previous assignment, your friend knows that you like music very much. So s/he gifts you a file with a collection of songs. The file contains the preorder traversal of a binary search tree, where the key is the song name as before. The search order is lexicographic order.
● By reading the file (5 marks), you have to construct (10 marks) the unique binary search tree that is yielded from the traversal. This will be your new “library” instead of the linked list that you created in the previous assignment.
● You want to ensure that the library of songs does not contain some songs that you hate. Delete them from the binary search tree (10 marks).
● “Create playlist” as an AVL tree (10 marks). Implement “Delete from Playlist” also, in case, you change your mind and want to delete some more songs after creating the playlist (10 marks).
● “Play Next” is an inorder traversal of the AVL tree.
● “Play Recent k/End” as in the previous assignment, using the same data structure. (5 marks, for integration effort)
File format: <preorder> Eg:
S4:S2:S5:S1:S6:S3
Reviews
There are no reviews yet.