The problem, in one line. Given a string of only opening and closing brackets, return the length of the longest contiguous piece that is correctly matched. LeetCode 32.
The tell. Matching brackets and a longest contiguous answer. A stack of positions turns every match into a length, because the top of the stack marks where the good stretch began.
Included with a plan
This solution is part of a plan.
A plan opens every lesson, board, video, lab and paper on chalk. Yearly is $39/year.