Question
An anagram is a word formed by rearranging the letters of another word. For this program, we will extend that definition to include any words
An anagram is a word formed by rearranging the letters of another word. For this program, we will extend that definition to include any words formed by rearranging any subsetsof letters of another word. Write a program that takes two arguments: a length n and a string, and outputs all english words of length n that appear in the given string. For example, if the
n= 4 andthe string is caret, the output would be similar to the following:
1 n = 4, word=Caret
2 acer
3 acre
4 aret
5 care
6 cart
7 cate
8 cert
9 race
10 rate
11 rect
12 tace
13 tare
14 tear
The input should accept both upper-case and lower-case letters in the string, and should
ignore the case when finding the anagrams.
in JAVA
They have given me the dictionary text file already
an example of the test file is: A AA AAA Aachen aah aahed aahing aahs aal Aalborg Aalesund aalii aaliis Aaliyah Aaliyah's aals Aalst Aalto AAM Aarau aardvark aardvark's aardwolf aardwolf's aardwolves Aargau aargh Aarhus Aaron Aaronic
I cant post it all because the file is too large.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started