The problem is:
Given an array of floating pointer numbers, find 3 numbers (not necessarily contiguous) that sum to a value bounded by the interval [1.0, 2.0]
This problem was posted here Triplet whose sum in range (1,2) and also https://www.thetopsites.net/article/50729117.shtml.
The algorithm in the latter link appears to be identical to the algorithm posted by @Amitrajit Bose in the stackoverflow question. This algorithm essentially uses a greedy approach that discards the largest of the current set of 3 numbers you're considering if the sum is > 2.0 and replaces it with the current number in the array, and if the sum is < 1.0, it replaces the smallest number in the current set of 3 numbers.
This algorithm seems wrong? Consider [0.2 0.2 1.7 0.5 0.05 0.05]. There are several solutions in this case and they must each use 1.7, but this algorithm would the number 1.7 and conclude that it is not possible to find a triplet under the given constraints.
Am I misunderstanding something?