By Long Luo

# Intuition

Basiclly, It’s base conversion.

We are familiar base $10$. How do we calculate a number?

From high to low, starting with $ans$ as $0$, update $ans$ with the current digit value each time, the update rule is $ans = ans \times 10 + val$.

If there is a decimal number, encoded as $\textit{ABC}$ not the arabic number, what’s it?

The answer is: $123$.

## Analysis

• Time Complexity: $O(N)$, $N$ is the length of the string $\textit{columnTitle}$.
• Space Complexity: $O(1)$.

All suggestions are welcome.
If you have any query or suggestion please comment below.
Please upvote👍 if you like💗 it. Thank you:-)

Explore More Leetcode Solutions. 😉😃💗