Loading...

The Quarter Turn

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

Domain
Python
Difficulty
medium
Seniority
mid, senior

Problem

An image processing library needs to rotate square matrices 90 degrees clockwise in-place for display transformations. Write a function that takes an n x n matrix and rotates it 90 degrees clockwise in-place, returning the modified matrix.

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.