Hi, I'm looking for an efficient way to do the following:

"given a column of entries with double values, select the greatest

value less than D", where D is given as the upper bound.

so if I have 0.1, 1.4, 10.11, 5.5 etc. then for D = 5, i should get

1.4.

My current solution stores all entries in an array and sorts them...

which I know is very very very inefficient.