Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
From the given string, find the corresponding rows and columns.
Iterate through the columns in ascending order and for each column, iterate through the rows in ascending order to obtain the required cells in sorted order.