How Can I sort 2D Array?

I know there is a function called sort from algorithm, and how do i make it sort a 2D array? how about finding the min or max values of it?!

Thank you for your time.
A 2d array us just an array of arrays so you would have to sort each array I guess
Well, I don't believe you can sort a 2D array using the sort function from algorithm... what you could do is make a function to do just that instead. Preferably keep it in a library in case it is ever needed, and under a namespace just in case it ever comes up in any libraries you download elsewhere. Something like that would actually be rather useful... In which way are you sorting the 2D array, anyway? Sorting it as one giant 1D array, where after each row you simply go down to the next and start from the far left again?
Topic archived. No new replies allowed.