Problem 1256 · Medium

Encode Number

Write num + 1 in binary, then drop its leading one to get the length-first code.

Open the interactive visualisation