Loading...

The Elevator Trace

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

Domain
Python
Difficulty
medium
Seniority
junior, mid

Problem

We need to simulate a sequential traversal of a nested data structure. Given a list of lists, return all elements visited first forward through every inner list left to right, then backward through the same lists right to left. Return the complete traversal sequence as a flat list.

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.