1 DSA problems asked in Cloudera coding interviews
1 Easy
0 Medium
0 Hard
All Categories
All
1 problem
Bit Manipulation
1
Number Complement
Easy
The complement of an integer is the integer you get by flipping every 0 to 1 and every 1 to 0 in its binary representation, without leading zeros. For example, 5 is "101" in binary and its complement is "010", which is 2. Given a positive integer num, return its complement.