Number System Solution

Yesterday I used a programming challenge to illustrate a use of generators. The solution to the problem given in that post was far from ideal – just a brute force hack, really. Today, let’s look at a respectable solution to the problem. Again, the problem: Imagine you are given a set of weights, each weight…