Greedy range of possible open-paren counts.
Maintain:
lo = minimum possible number of openshi = maximum possible number of opens
Process chars:lo to 0. If hi < 0, impossible. Valid if lo==0 at end.Greedy range of possible open-paren counts.
Maintain:
lo = minimum possible number of openshi = maximum possible number of opens
Process chars:lo to 0. If hi < 0, impossible. Valid if lo==0 at end.