DataDrivenDataDriven
LearnPracticeInterviewDiscussDailyJobs

The Order Enforcer

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

Domain
Python
Difficulty
easy
Seniority
L3

Problem

We're validating recorded step logs, each a string of lowercase codes where the rule is that no `a` step may appear once a `b` has occurred. Return whether a given log holds to that order.

Summary

Some rules say every A must come before every B.

Practice This Problem

Solve this Python problem with real code execution. DataDriven runs your Python code in a real environment and checks it automatically.

Related

  • All Practice Problems
  • Mock Interview Mode
  • Python Interview Questions
  • Data Engineering Interview Prep Guide
  • Daily Challenge
  • Data Engineering Lessons