Java Bit Manipulation Leetcode Problems