Counting Bits Leetcode Solution C