Check whether a string of (), [] and {} brackets is balanced — and if not, how many reversals would fix it.
Check whether a string of (), [] and {} brackets is balanced — and if not, how many reversals would fix it.
The discussion opens with the full question.