Talk:Balanced brackets

From Rosetta Code
Revision as of 06:35, 21 February 2011 by rosettacode>Paddy3118 (→‎Extension?: Not sure it would make it better?)

Name change?

I propose this be changed to "Balanced brackets" to make it more descriptive. --Paddy3118 18:13, 20 February 2011 (UTC)

I'm on board with that. --Mwn3d 20:22, 20 February 2011 (UTC)
Me too.--Tikkanz 22:37, 20 February 2011 (UTC)
Seems sensible to me. Done. –Donal Fellows 23:10, 20 February 2011 (UTC)

Extension?

Currently the task specifies that the strings to be tested will all have the same number of opening as closing brackets. Would it be worthwhile to generalize the problem to also include strings with uneven numbers of opening and closing brackets?--Tikkanz 22:37, 20 February 2011 (UTC)

The requirement for an even number of opening and closing brackets seems to be an attempt to make the random generator more likely to produce a string of balanced brackets. The algorithms used tend to end with a check that their are no un-closed brackets when you reach the end of the string so a change would not affect them. --Paddy3118 06:35, 21 February 2011 (UTC)