a matrix diagonal diagonal line cell start cell topmost row leftmost column go bottomright direction reach matrixs end for example matrix diagonal start mat20 mat 6 x 3 matrix include cell mat20 mat31 mat42Given m x n matrix mat integer sort matrix diagonal ascending order return result matrix Example 1input mat 331122121112output 111112221233example 2input mat 1125661697235517451552753136445882227332568484281411550output 5174152711112545869142325445815222731365066842875335568 Constraintsm matlengthn matilength1 m n 1001 matij 100