Skip to main content

Timeline for answer to Finding all combinations of well-formed brackets by KingNestor

Current License: CC BY-SA 2.5

Post Revisions

8 events
when toggle format what by license comment
Apr 7, 2009 at 23:36 comment added KingNestor Yes, everyone.. feel free to help reduce this one down further. It would be nice if we could get rid of the intermediary function before the recursive call.
Apr 7, 2009 at 23:33 comment added mmcdole @KingNestor, I made a quick edit to the code so it spits it out exactly as the OP wanted. Small change, I called Brackets() recursively which then called foo() recursively. I'm trying to shrink yours down a little right now.
Apr 7, 2009 at 23:31 history edited Brian CC BY-SA 2.5
fixed code so it compiles
Apr 7, 2009 at 23:31 history edited mmcdole CC BY-SA 2.5
added 173 characters in body
Apr 7, 2009 at 23:26 comment added aleemb as per forum, fourth line should read output[2*pairs - 1] = ')'; not output[1] = ')';
Apr 7, 2009 at 23:15 history undeleted KingNestor
Apr 7, 2009 at 23:15 history deleted KingNestor
Apr 7, 2009 at 23:14 history answered KingNestor CC BY-SA 2.5