Minimum Add to Make Parentheses Valid — Interactive Visualizer

Find the minimum number of insertions to balance parentheses.