Loading...
The Order Inspector
A medium Python interview practice problem on DataDriven. Write and execute real python code with instant grading.
- Domain
- Python
- Difficulty
- medium
- Seniority
- mid, senior
Problem
A database index validation tool needs to confirm that a binary search tree satisfies its ordering invariants at every node. Given a tree represented as a dictionary mapping node names to objects with 'val', 'left', and 'right' keys, and a root node name, return True if the tree is a valid BST.
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.