Function to Convert given Matrix into sorted Spiral Matrix
def convertMatrixToSortedSpiral ( y , m , n ) : NEW_LINE INDENT a = [ [ 0 for i in range ( MAX ) ] for j in range ( MAX ) ] NEW_LINE x = [ 0 for i in range ( 15 ) ] NEW_LINE x = convert2Dto1D ( y , m , n ) NEW_LINE x = SortArray ( x ) NEW_LINE ToSpiral ( m , n , x , a ) NEW_LINE PrintMatrix ( a , m , n ) NEW_LINE DEDENT