SubName: It´s more an how to do as an Sub
Description: How to sort an array of INTs and get the Top 5 of them
In this code the TOP5 of the given Int-Array is evaluated
Tags: sort array
Description: How to sort an array of INTs and get the Top 5 of them
In this code the TOP5 of the given Int-Array is evaluated
B4X:
Dim A() As Int
A = Array As Int(5, 7, 1, 4, 9, 2)
Dim L As List
L.Initialize
L.AddAll(A)
L.Sort(False)
For i = 0 To 4
Log(L.Get(i))
Next
9
7
5
4
2
Tags: sort array