You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The best_fit function does not always produce the correct result. Consider the following item list: [0.38, 0.35, 0.06, 0.21, 0.28, 0.57, 0.15]. The Best Fit algorithm should use exactly two bins: (0.38, 0.35, 0.06, 0.21) and (0.28, 0.57, 0.15). However, the code reports three bins being used.
This is likely caused due to a floating-point precision issue.
The text was updated successfully, but these errors were encountered:
Also I don't understand how you can use the remaining capacity as key in the dictionary. What happens if at a certain point two or more bins have the same remaining capacity?
The
best_fit
function does not always produce the correct result. Consider the following item list:[0.38, 0.35, 0.06, 0.21, 0.28, 0.57, 0.15]
. The Best Fit algorithm should use exactly two bins: (0.38, 0.35, 0.06, 0.21) and (0.28, 0.57, 0.15). However, the code reports three bins being used.This is likely caused due to a floating-point precision issue.
The text was updated successfully, but these errors were encountered: