Search⌘ K
AI Features

Solution: Base 7

Understand how to convert a decimal integer to its base 7 representation by using repeated division and collecting remainders. Learn how to manage negative numbers and zero cases. This lesson provides a clear method to convert numbers and evaluates the time and space complexity involved.

Statement

Given an integer num, return a string representing its base 77 equivalent.

Constraints:

  • 107-10^7 \leq num 107\leq 10^7 ...