Bit Manipulation Java Leetcode Interview