Bit Manipulation Leetcode Problems Javascript