โ† Swiggy questions

Check for balanced parentheses in O(1) space

Filed under Swiggy

The question

Given a string containing parentheses, check whether it is balanced using O(n) time complexity and O(1) extra space.

No write-up yet. Related questions below have one.

Related Swiggy questions

Collected from public candidate posts and coding forums. Updated Nov 2026.