Matching Brackets

Matching Brackets approaches

foldleft

recursion

repeated-substitution

stack-match