This can be done by recursion. Each number can be represented as:
N => 1) (N-1), 1 2) (N-2), 2 3) (N-3), 3 .... N) (1), (N-1) For each number (N-k), repeat the above in recursion. => Gives all the unique partitions. -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.