convert to base -2
IntuitionApproachComplexity
Time complexity:

Space complexity:
Code
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->

# Approach
<!-- Describe your approach to solving the problem. -->

# Complexity
- Time complexity:
<!-- Add your time complexity here, e.g. $$O(n)$$ -->

- Space complexity:
<!-- Add your space complexity here, e.g. $$O(n)$$ -->

# Code
```python3 []
class Solution:
    def baseNeg2(self, n: int) -> str:
        result = []
        if n==0:
            return "0"
        while n != 0:
            rem = n % -2
            n = n // -2
            if rem < 0:
              rem += 2
              n += 1
            result.append(str(rem))
        return "".join(result[::-1])

```
['Python3']