This solution was initially intended to solve problems similar to the knapsack 0/1 or subset sum problem.
Example: consider the list of numbers [100, 210, 260, 80, 90]
If the target = 500 then the best solution is
[100, 210, 80, 90] = 480.
To understand how it works we will use smaller values.
[15, 4, 4, 2, 1, 0.80, 0.50, 0.49] is the list of values.
9.99 is the target.
// Create a new GreedyApproximation instance
grapprox := calculator.NewGreedyCalculator(items, maxAmount)
// Calculate the best solution
bestSolution := grapprox.Calculate(context.Background())
// Print the best solution
fmt.Println(bestSolution)