How to store words with their synonyms, in ascending sorted order? Which collections framework class to use?
LInkedList with binaryTrees
Generally words with synonym is a kind of dictionary where you are storing a word - and set of synonyms with it, which is a kind of key-value pairs.
This kind of keys and values can be stored using maps.
But since you want it to be in the sorted order, then go for SortedMaps in the collections framework.
You can also use TreeMap for this.
Back To Top