Bit Manipulation Java Leetcode Problems