Bit Manipulation Leetcode Problems Java