Mastercard Interview Question

Sort a 2D matrix (DSA problem)