Stack solution for multiple brackets

Includes new test cases and a minor style tidy-up in a previous solution.