Question: Continue Exercise P13.1, checking the words against the /usr/share/dict/words file on your computer, or the words.txt file in the companion code for this book. For
Continue Exercise P13.1, checking the words against the /usr/share/dict/words file on your computer, or the words.txt file in the companion code for this book. For a given number, return only actual words.
Data from Exercise P13.1,
Phone numbers and PIN codes can be easier to remember when you find words that spell out the number on a standard phone pad. For example, instead of remembering the combination 5282, you can just think of JAVA. Write a recursive method that, given a number, yields all possible spellings (which may or may not be real words).
Step by Step Solution
3.35 Rating (173 Votes )
There are 3 Steps involved in it
The method below getWords takes in a number num and a list of words words It returns all possible sp... View full answer
Get step-by-step solutions from verified subject matter experts
