I
Index
Hi, I have a 4 dimensional array and I want to sort it by the first two
columns emulating an ORDER BY clause to some extent.Any suggestion?
The original Array is:
Row1-> 4 8 2 9
Row2-> 4 5 5 3
Row3-> 3 9 8 7
Row4-> 8 2 4 8
The sorted array should look:
Row1-> 3 9 8 7
Row2-> 4 5 5 3
Row3-> 4 8 2 9
Row4-> 8 2 4 8
In fact the columns upon which the sorting is to be done is also
dynamic.
Please provide me some efficient algo or implementation.The data to be
handled is rather huge.So efficiency is a vital requirement.
Thanks.
columns emulating an ORDER BY clause to some extent.Any suggestion?
The original Array is:
Row1-> 4 8 2 9
Row2-> 4 5 5 3
Row3-> 3 9 8 7
Row4-> 8 2 4 8
The sorted array should look:
Row1-> 3 9 8 7
Row2-> 4 5 5 3
Row3-> 4 8 2 9
Row4-> 8 2 4 8
In fact the columns upon which the sorting is to be done is also
dynamic.
Please provide me some efficient algo or implementation.The data to be
handled is rather huge.So efficiency is a vital requirement.
Thanks.