Skip to content

Switch Sign of a Number

We make use of bit manipulation to solve this problem. using a NOT operator.

Data Structures and Algorithms Bit Manipulation
Gopi Gorantala