Java 1ms super easy
so the base -2 is much like base 4, adding \'00\' by the end makes it x4\nthe last two digits has values \'10\'=-2, \'11\'=-1, \'00\' = 0, \'01\'=1\nby adding 2
so the base -2 is much like base 4, adding \'00\' by the end makes it x4\nthe last two digits has values \'10\'=-2, \'11\'=-1, \'00\' = 0, \'01\'=1\nby adding 2,1,0 or -1 we can make last two digits \'00\'\n\nwhen it\'s divisable by 4, it means last two is \'00\', ex: 12 = \'11100\'=  \'111\' x 4\nwhen it\'s not , add 2,1,or -1 to make it  divisable by 4:\nex: 11 = 12 +(-1) =  \'11100\' + \'11\'\n or 11 = 12+(-1) = 3x4+(-1)= ((1x4)+(-1)) x4 + (-1)\n 1=\'1\' so 1x4 = \'100\', (1x4)+(-1) = \'111\', ((1x4)+(-1))x4 = \'11100\', ((1x4)+(-1))x4 + (-1) = \'11111\'\n\n\n\n```\nclass Solution {\n    public String baseNeg2(int n) {\n        if (n==1)return "1";\n        if (n==0)return "0";\n            \n        if ((n+2)%4==0) return baseNeg2((n+2)/4)+"10";\n        if ((n+1)%4==0) return baseNeg2((n+1)/4)+"11";\n        if ((n)%4==0) return baseNeg2((n)/4)+"00";\n        if ((n-1)%4==0) return baseNeg2((n-1)/4)+"01";\n\n        return "0";\n\n    }\n\t}\n```\n
[]