A question I got on my last interview:
Design a function f, such that: f(f(n)) == -n Where n<
Design a function f, such that:
f
f(f(n)) == -n
Where n<
n<
I could imagine using the 31st bit as an imaginary (i) bit would be an approach that would support half the total range.