Talk:Balanced brackets: Difference between revisions
Content added Content deleted
Line 10: | Line 10: | ||
: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. --[[User:Paddy3118|Paddy3118]] 06:35, 21 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. --[[User:Paddy3118|Paddy3118]] 06:35, 21 February 2011 (UTC) |
||
::Except the J implementation does not include the second test, since it was not asked for. |
::Except the J implementation does not include the second test, except as a footnote, since it was not asked for. --[[User:Rdm|Rdm]] 13:41, 21 February 2011 (UTC) |