• + 1 comment

    Since we know the color limit (100), you should probably use a boolean array rather than a hash-set. It will be much faster.