solulubeta
Sign in
Story Problems / Greedy
06.18 · Problem

Balance the Brackets

Medium Running balance counter Pro

This problem is part of solulu Pro

A string contains only ( and ). In one step you may insert a bracket anywhere. What is the minimum number of insertions to make the string a balanced bracket sequence?

Lifetime ₹2,000 ₹1,000 · Beta offer
Mark this problem as solved when you are finished.

Item 72 of 94 · updated 2026-10-12