takeUforward
Minimum number of bracket reversals needed to make an expression balanced - Tutorial