Excel Sheet Column Title

Easy

Company Tags

You are given an integer columnNumber, return its corresponding column title as it appears in an Excel sheet.

For example:

A -> 1
B -> 2
C -> 3
...
Z -> 26
AA -> 27
AB -> 28 
...

Example 1:

Input: columnNumber = 32

Output: "AF"

Example 2:

Input: columnNumber = 53

Output: "BA"

Constraints:

  • 1 <= columnNumber <= ((2^31)-1)


Company Tags

Please upgrade to NeetCode Pro to view company tags.

columnNumber =