FastPrepRotate a Rectangular Image Clockwise
Problems/Rotate a Rectangular Image Clockwise

Rotate a Rectangular Image Clockwise

Luma AI logoLuma AI● EasyFULLTIMEOA

Updated Sep 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: A first-hand Luma AI assessment gives the full rectangular grayscale-image rotation contract. The practice task preserves that contract and matches the report at about 99%.

Given an H × W grayscale integer image, return a new W × H image rotated 90 degrees clockwise.

Function

rotateClockwise(image: int[][]) → int[][]

Examples

Example 1

image = [[1,2,3],[4,5,6]]return = [[4,1],[5,2],[6,3]]
image
01201231456
→
return
01041152263

The first output row is the original first column read bottom to top.

Constraints

  • 1 <= H, W <= 200.
  • Every row has exactly W entries.

More Luma AI Online Assessment questions

  • Build a Gaussian Blur KernelOA · Seen Jun 2026
  • Center Crop a Grayscale ImageOA · Seen Jun 2026
  • Impute Missing Values and Normalize ColumnsOA · Seen Jun 2026
  • Minimum Euclidean Distance Between PointsOA · Seen Jun 2026
  • Numerically Stable SoftmaxOA · Seen Jun 2026
  • Triangle Flags from Adjacent ElementsOA · Seen Jun 2026

Similar questions at other companies

  • Survey Table: Group Given an AnswerSusquehanna International Group (SIG) · OASusquehanna International Group (SIG) interview questions
  • Wind-Blown Leaves Remaining in a GridAbridge · OAAbridge interview questions
  • Query a Header-Encoded MatrixNVIDIA · OANVIDIA interview questions
  • Trapped Characters in a GridAdobe · OAAdobe interview questions
  • Find Zero Cells in a 2×2 GridRoblox · OARoblox interview questions
  • Make Pixel Columns Strictly IncreasingMicrosoft · OAMicrosoft interview questions
  • Count Pieces After Othello MovesHudson River Trading · OAHudson River Trading interview questions
  • Check Matrix Reflection SymmetryIntuit · OAIntuit interview questions
  • Tic-Tac-Toe Board StatusPinecone · OA
  • Cherry PickupInfosys · OAInfosys interview questions
All Luma AI interview questionsSee Luma AI hiring insights
Saved
class Solution {
    public int[][] rotateClockwise(int[][] image) {
        // Return a 90-degree clockwise rotation.
    }
}
Checking account…