Loading...

Pivot Records

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

Domain
Python
Difficulty
hard

Problem

A pivot step reshapes a flat list of row-col-value records into a nested lookup structure. Each record is a dict with 'row', 'col', and 'val' keys. Return a nested dict of the form {row: {col: val}}.

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.