Javascript – Balanced Parantheses Algorithm
I've been studying backtracking / DFS algorithms and came across the balanced parentheses problem. This snippet populates an array with all valid parentheses combos based on the value of argument n. function findCombo(n, cur, usedOpen, usedClose) { if (usedOpen ===…