This post is part of a series on Mohammad Anwar’s excellent Perl Weekly Challenge, where Perl and Raku hackers submit solutions to two different challenges every week. (It’s a lot of fun, if you’re into that sort of thing.)
The second challenge this week is another old chestnut:
Write a script to generate a string with random number of ( and ) brackets. Then make the script validate the string if it has balanced brackets.
The question has two parts:Continue reading “Balanced Parentheses”