Hi,
I faced a question in interview..
Q: Suppose I have a table like this:
Name | E1 | E2
------------|-------|------------------------
A | 9 | 6
B | 5 | 7
C | 8 | 9
D | 5 | 9
E | 9 | 9
Arrange 'Name' sorted by assending order of 'E1'.
Name | E1 | E2
---------|-----|------------------------
A | 9 | 6
E | 9 | 9
C | 8 | 9
B | 5 | 7
D | 5 | 9
then if E1 is same so sorted by E2.
Name | E1 | E2
---------|-----|------------------------
E | 9 | 9
A | 9 | 6
C | 8 | 9
D | 5 | 9
B | 5 | 7
So how can we do this with array?