← HSBC questions

Sort a 2D Matrix by Row

Filed under HSBC

Given an M x N 2D matrix, sort each individual row in non-decreasing order. The relative order of the rows within the matrix should remain the same, but the elements within each row must be rearranged…

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related HSBC questions

Collected from public candidate posts and coding forums. Updated Nov 2026.