Integer to binary
Your task
Given a non-negative integer n, return its binary representation as a string without any '0b' prefix and without leading zeros, except that 0 itself returns '0'. For example 13 returns '1101'. You may not use Python's bin() builtin; build the digits yourself.
Examples
to_binary(n: int) -> strExample 1
Input
to_binary(13)Output
"1101"