Loading...
The Order Enforcer
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
You need to validate that a process queue is properly ordered. Given a string of request codes, verify that the sequence respects a strict ordering rule: once a type-B request appears, no type-A request can follow it. Return True if the sequence is valid, False otherwise.
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.