I searched extensively and can't figure out what the infinity sign is meant in this pseudocode.
The code is taken from here, which has a detailed explanation of dynamic programming for the coin change problem.
Software Engineering Stack Exchange is a question and answer site for professionals, academics, and students working within the systems development life cycle. It only takes a minute to sign up.
Sign up to join this communityI searched extensively and can't figure out what the infinity sign is meant in this pseudocode.
The code is taken from here, which has a detailed explanation of dynamic programming for the coin change problem.
That line (3) is simply saying initialize the Minimum value to the highest feasible value. In pseudocode that is infinity. If min was UInt32 in real code, then min would be UInt32.Max.
In other words, start off min at a really high value, so when searching iteratively for progressively lower values (by comparing to the previous value), then the first value is something so high that the next value will always become the next min.