1017. Convert to Base -2
Description
**Input:** n = 2
**Output:** "110"
**Explantion:** (-2)2 + (-2)1 = 2**Input:** n = 3
**Output:** "111"
**Explantion:** (-2)2 + (-2)1 + (-2)0 = 3**Input:** n = 4
**Output:** "100"
**Explantion:** (-2)2 = 4ac
Previous1016. Binary String With Substrings Representing 1 To NNext1018. Binary Prefix Divisible By 5
Last updated