Balanced brackets: Difference between revisions

m
Line 1,425:
Straightforward depth counting:
<lang Perl>use 5.10.0; # for given ... when construct
sub balanced2balanced {
my $depth = 0;
my @a = split('', shift);
2,747

edits