text: This function uses extractMin ( ) to print elements in sorted order
code: static void printSorted ( int mat [ ] [ ] ) { System . out . println ( " Elements ▁ of ▁ matrix ▁ in ▁ sorted ▁ order ▁ n " ) ; for ( int i = 0 ; i < N * N ; i ++ ) { System . out . print ( extractMin ( mat ) + " ▁ " ) ; } }