MCPcopy
hub / github.com/doocs/leetcode / encode

Method encode

solution/1200-1299/1256.Encode Number/Solution.py:2–3  ·  view source on GitHub ↗
(self, num: int)

Source from the content-addressed store, hash-verified

1class Solution:
2 def encode(self, num: int) -> str:
3 return bin(num + 1)[3:]

Callers 2

get_question_detailMethod · 0.45
get_question_detailFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected