Just a quick question.
Which option would be more efficient?
- Sorting a 2D array (Each value in the 1st dimension of the array is linked to the value in the 2nd so they must be sorted equally [value and ID number] ).
or
- Sort a 1D array and then compare(using linear search) values against another set of values to check if they match (in order to find which ID number corresponds to each value).
All values are guaranteed to be different so there is no problem with duplication of numbers. Even if there was it wouldn't matter.
Is there a way of finding out how efficient both methods are in the debugger?
Thank you all for your time. =]
Seb