Given a set of n elements x > 0 and a weight W. Find the minimum of elements needed that sum up to W or greater. I am struggling to find a linear time (O(n)) algorithm.
[Edit: Linear sorting algorithm cannot be used her since all values are rationals (also distinct rationals)]