Given an integer n, return a binary string representing its value in base −2-2−2.
n
Constraints:
0≤n≤1090 \le n \le 10^90≤n≤109
Now, let’s take a moment to make sure you’ve correctly understood the problem. The quiz below helps you check if you’re solving the correct problem:
Convert to Base -2
What is the base ( -2 ) representation for the input 0?
0
1
10
00
We have a game for you to play. Rearrange the logical building blocks to develop a clearer understanding of how to solve this problem.
Implement your solution in the following coding playground.