1017. Convert to Base -2
https://leetcode.com/problems/convert-to-base-2
Description
Given an integer n
, return a binary string representing its representation in base -2
.
Note that the returned string should not have leading zeros unless the string is "0"
.
Example 1:
Example 2:
Example 3:
Constraints:
0 <= n <= 109
ac
Previous1016. Binary String With Substrings Representing 1 To NNext1018. Binary Prefix Divisible By 5
Last updated