Bucket sort on variable amount of bits