Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2009
    Posts
    1
    Rep Power
    0

    Default recursive solution for generating all subsets of[1,2,...,n]

    Outline a recursive solution for generating all subsets of the set [1,2,...,n]

  2. #2
    pbrockway2 is offline Moderator
    Join Date
    Feb 2009
    Location
    New Zealand
    Posts
    4,585
    Rep Power
    12

    Default

    Sorry about the "null" response, but the problem with:

    Java Code:
    while(notSolvedForMe) {
        solution = requestSolution();
        notSolvedForMe = solution == null;
    }
    handInAsMyWork(solution);
    is that it is iterative, rather than recursive.

    Better, perhaps, to outline your own thoughts - both about the algorithm and its Java implementation. Then you will have questions to ask.

Similar Threads

  1. Recursive Counting
    By zlwilly in forum New To Java
    Replies: 1
    Last Post: 01-29-2009, 09:42 PM
  2. Generating PDF from XML with servlet
    By Preethi in forum Advanced Java
    Replies: 2
    Last Post: 10-30-2008, 06:50 PM
  3. Recursive Method
    By bluegreen7hi in forum New To Java
    Replies: 5
    Last Post: 11-29-2007, 05:45 AM
  4. Recursive Anagram
    By zoe in forum Advanced Java
    Replies: 1
    Last Post: 08-07-2007, 07:15 AM
  5. Help with recursive implementation
    By toby in forum Advanced Java
    Replies: 1
    Last Post: 08-07-2007, 06:57 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •