Hello there,
I am writing a data structure and restricted not to use any API or collection.
I have written a Sorted Linkedlist, which stores strings in ascending order.
Basically I am writing a dictionary, which can be easier to implement by Map, HashMap or Dictionary provided by Collection API, but I can't.
So I need to store the word in ascending order and store their variations(or consider meanings) also in ascending order.
I can use same Sorted LinkedList to do the same. One Linkedlist for words and second for their variations.
The problem is when I delete the word, it should also delete their variations(meanings) from list.
Currently it is not possible to do, because the position of word and their variations are not same due to sorting.
Any help would be appreciated.