Talentd/FleetCode/Problems/

1256. Encode Number

Medium
Read SolutionWatch Video

1256. Encode Number

Medium70.0% AcceptancePremium
PremiumFree on FleetCode

Given a non-negative integer num, Return its encoding string.

The encoding is done by converting the integer to a string using a secret function that you should deduce from the following table:

Example 1:


Input: num = 23

Output: "1000"

Example 2:


Input: num = 107

Output: "101100"

Constraints:

  • 0 <= num <= 10^9
Asked by 1 company
Similar Questions

Loading editor...

23