Yvaine
07-14-2008, 09:12 PM
Given a 2-dimension array like below
arry(0,0) = A
arry(0,1) = 11
arry(1,0) = "B"
arry(1,1) = "1"
....
Lazy to assign one by one..The layout is like this
A 11
B 1
C 3
D 5
E 43
G 1
H 1
I 0
In fact we do not know what are the items in the array, what i hv put is just example.
Ok, the task is to get top 5 items. In this case the result should be
E 43
A 11
D 5
C 3
B 1
G 1
H 1
If the top 5 6 7 ..... is having the same number, all of them should be included in the result.
Anyone can tell me how to code it?
arry(0,0) = A
arry(0,1) = 11
arry(1,0) = "B"
arry(1,1) = "1"
....
Lazy to assign one by one..The layout is like this
A 11
B 1
C 3
D 5
E 43
G 1
H 1
I 0
In fact we do not know what are the items in the array, what i hv put is just example.
Ok, the task is to get top 5 items. In this case the result should be
E 43
A 11
D 5
C 3
B 1
G 1
H 1
If the top 5 6 7 ..... is having the same number, all of them should be included in the result.
Anyone can tell me how to code it?