I have an array of numbers:
a= [[0, 0.1667],
[1, 0.1667],
[2, 0.25],
[3, 0.25],
[4, 0.167]].
Each pair contains numbers and their proportions.
I want to compare a particular number Z with the resulted proportions. Lets assume, Z=0.02. So I have to iterate through the proportions and compare each proportion with Z and find the number whose proportion falls below Z and print that number only.
I think, the proportions need to sorted from highest to lowest first and then it has be compared with Z.