Stuck on Balanced Parenthesis (Codewars)

So I’ve been malding on this problem for over 3 days, and I still can’t seem to find any visible pattern to how you can relate the current index in the sorted parenthesis list to a new index in a previous parenthesis list.

Could I have a pointer as to where to start looking for a pattern?

Nevermind, I figured it out. Here’s the solution if anyone wants to see it.

1 Like