Balanced brackets: Difference between revisions
Content added Content deleted
m (→with 40 examples: changed the wording in the output section.) |
m (used highlighting instead of quoted strings in the task requirements.) |
||
Line 1: | Line 1: | ||
{{task}} |
{{task}} |
||
'''Task''': |
'''Task''': |
||
* Generate a string with |
* Generate a string with '''N''' opening brackets <big>'''['''</big> and with '''N''' closing brackets <big>''']'''</big>, in some arbitrary order. |
||
* Determine whether the generated string is ''balanced''; that is, whether it consists entirely of pairs of opening/closing brackets (in that order), none of which mis-nest. |
* Determine whether the generated string is ''balanced''; that is, whether it consists entirely of pairs of opening/closing brackets (in that order), none of which mis-nest. |
||