Question bank › Matrix
Dsa Matrix Easy

Matrix Row Shuffle

You are given a matrix represented as a list of lists. Your task is to shuffle the rows of the matrix. The shuffling should be random, but for this problem, you will return the rows rearranged in order of their values summed across the row, from smallest to largest. Example: Input: 3 2 1 5 4 3 1 0 0 Output: 1 0 0 3 2 1 5 4 3

Key concepts

matrixshuffling

Practise this out loud — free

Start a mock interview on THIS exact question — a voice AI interviewer opens with it, pushes back like a real onsite, then hands you an instant scorecard.

🎙 Practise this question now
Part of Praxari's verified interview question bank. We show the prompt and concepts to practise with — never a copy-paste solution.