Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
    Bookmark Topic Watch Topic
  • New Topic

i want to try and solve this question..

 
alex lotel
Ranch Hand
Posts: 191
  • Mark post as helpful
  • send pies
  • Report post to moderator
i need to constract a method which gets the two numbers
"n" and "k"
and prints all the avaible subgroops in "k size"
for example :

subsetofsize(4,2)
prints

12
41
13
32
42
34

i know i should use this recursion of subsets
i need to change it some how
i know how it works but i dont have any clue of how to change it
in order to get the resolt i was asked in the question

 
Joe Ess
Bartender
Posts: 9280
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please do not post the same question more than once. It causes confusion and duplication of effort as the community tries to help everyone.
 
Campbell Ritchie
Sheriff
Pie
Posts: 48968
60
  • Mark post as helpful
  • send pies
  • Report post to moderator
Joe, can I suggest you delete this thread and transfer the original thread from Intermediate over here?
 
alex lotel
Ranch Hand
Posts: 191
  • Mark post as helpful
  • send pies
  • Report post to moderator
you said that i should go to the begginer forum with that question

thats what i did

didnt mean to cause any inconvinience
 
It is sorta covered in the JavaRanch Style Guide.
    Bookmark Topic Watch Topic
  • New Topic