Given a number in base -2 in binary form. return negative of that number in base -2 in binary form.↵
Given [1,0,0,1,1,1] => return [1,1,0,1,0,1,1] .↵
[1,0,0,1,1,1] = -23 (from left) , neg(-23) = 23↵
in base -2, 23 is [1,1,0,1,0,1,1].↵
Length of the given array <= 10^5↵
↵
Any idea? Thanks in advance.
Given [1,0,0,1,1,1] => return [1,1,0,1,0,1,1]
[1,0,0,1,1,1] = -23 (from left) , neg(-23) = 23↵
in base -2, 23 is [1,1,0,1,0,1,1].↵
Length of the given array <= 10^5↵
↵
Any idea? Thanks in advance.