Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
I want to ask something...
I want to sort a 2d integer array with bubble,selection and quick sort algorithms.
I have a problem to compare the last element of the first row with the first element of second row
i.e f(or a NxN array with N=5)
 with 
 with 
My idea is to copy the elements of the 2d array to 1d array,sort the 1d array and finally copy back the elements to the 2d array.
I dont think that's the best way...Can you give me some ideas on how to sort a 2d array with these methods(bubble ,selection and quick sort )
0 · ·