Loading...

The Paired Doors

A easy Python interview practice problem on DataDriven. Write and execute real python code with instant grading.

Domain
Python
Difficulty
easy
Seniority
junior, mid

Problem

A code linting tool needs to verify that all grouping symbols in a file are properly matched and nested. Given a string containing only parentheses, square brackets, and curly braces, return True if the string is valid. A string is valid if every opening symbol has a matching closing symbol in the correct order.

Practice This Problem

Solve this Python problem with real code execution. DataDriven runs your Python code in a sandboxed Docker environment and grades it instantly.