Back to course home
0% completed
Vote For New Content
Concise solution
Mohammed Dh Abbas
Jul 22, 2024
class Solution: def decimalToBinary(self, num): stack = [] while num > 0: stack.append(str(num % 2)) num = num // 2 stack.reverse() return ''.join(stack)
0
0
Comments
Comments
On this page