A string of brackets has exactly one more of one type than the other. Count the positions where inserting one bracket of the missing type makes the string balanced.
Unlock detailed company stats for this questionUpgrade
Examples: '())' gives 3 and ')((' gives 0.
Community answers
No answers contributed by the community yet.
Related courses

Course

