Decide whether a string of (, ) and * can be balanced when each * may be (, ) or nothing — then do it in O(1) space.
Decide whether a string of (, ) and * can be balanced when each * may be (, ) or nothing — then do it in O(1) space.
Opens with the full question.