aspose file tools*
The moose likes Java in General and the fly likes you are my last resort for this question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Java in General
Reply locked New topic
Author

you are my last resort for this question

alex lotel
Ranch Hand

Joined: Feb 01, 2008
Posts: 191
i have tried the medium part
but i couldnt get it solved
so i am asking if you have some people that can solve this recursive question

here is a question and i have a very similar code but i need to convert it
some how in order to fit this question

question:
In order to make their phone numbers more memorable, service providers like to find numbers that spell out some word (called a mnemonic) appropriate to their business that makes that phone number easier to remember. For example, the phone number for a recorded time-of-day message in some localities is 637-8687 (NERVOUS). Imagine that you have just been hired by a local telephone company to write a method listMnemonics that will generate all possible letter combinations that correspond to a given number, represented as a string of digits. For example, if you call
recursiveObject.listMnemonics("723")
your method shall generate and print out (using recursion) the following 27 possible letter combinations that correspond to that prefix:
PAD PBD PCD RAD RBD RCD SAD SBD SCD
PAE PBE PCE RAE RBE RCE SAE SBE SCE
PAF PBF PCF RAF RBF RCF SAF SBF SCF

notice that always every char come from a different group
for each uniq group of letters we have its reprasentative number
my efforts in solving it:
i know that in order to solve this question is need to use a recursive methos that
prints out all the subsets of a given string letters with a given resolt string size

i have built this code
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60080
    
  65

Please do not post the same question more than once.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: you are my last resort for this question
 
Similar Threads
i want to try and solve this question..
Programming Diversion 2b: Applying a hat
here is a question and i have a very similar code but i need to convert it
i want to try and solve this question..
Java Recursion and binary tree searching questions