Create a project/program in Java called Unscramble Word. Given a string of ‘N’ characters
print all the words present in a dictionary of length ‘M’ such that 3 < M <= N.
Use dictionary present in Linux @ /usr/share/dict/words.
Implement this code in java and the student may use inbuilt data structures such as Maps,
Sets, etc. (For fast execution, use of Trie is suggested).
Input: A String
Output: All unscrambled words of given string present in the dictionary categorized by length
of word. Also print the total number of words of each length.
Input: “great”
Output:
Length: 5 greta, grate, great, retag, targe Count: 5
Length: 4 ager, gate, gear, geta, grat, rage, rate, tare, tear Count: 9
Create a project/program in Java called Unscramble Word. Given a string of ‘N’ characters
print all the words present in a dictionary of length ‘M’ such that 3 < M <= N.
Use dictionary present in Linux @ /usr/share/dict/words.
Implement this code in java and the student may use inbuilt data structures such as Maps,
Sets, etc. (For fast execution, use of Trie is suggested).
Input: A String
Output: All unscrambled words of given string present in the dictionary categorized by length
of word. Also print the total number of words of each length.
Input: “great”
Output:
Length: 5 greta, grate, great, retag, targe Count: 5
Length: 4 ager, gate, gear, geta, grat, rage, rate, tare, tear Count: 9