Python data engineering interview problem. Difficulty: intermediate. Pattern: Linked Lists. About 14 minutes. Part of the Pro drill bank.
Reorder to L0, Ln, L1, Ln-1, ... Treat this as a production helper: match the contracted return shape, including empty and duplicate inputs.
Implement reorder_list(values: list) -> list reordering in-place style to L0, Ln, L1, Ln-1, ...
Input: reorder_list([1, 2, 3, 4]) Output: [1, 4, 2, 3] Weave front and reversed back.
Topics: lakebench, python, reorder, list api.
More Python interview questions · All interview problems · Learn data engineering
Interview-style drill: Reorder to L0, Ln, L1, Ln-1, ...
Implement `reorder_list(values: list) -> list` reordering in-place style to L0, Ln, L1, Ln-1, ... Example: `[1, 2, 3, 4]` → `[1, 4, 2, 3]`. Keep the harness.