Zepruv › Coding problems

Excel Sheet Column Title

Easy · Math, String

Given an integer columnNumber, return its corresponding column title as it appears in an Excel sheet.
For example:

Example 1

Input: columnNumber = 1
Output: "A"

Example 2

Input: columnNumber = 28
Output: "AB"

Example 3

Input: columnNumber = 701
Output: "ZY"

Constraints

Starter code (python)

class Solution(object):
    def convertToTitle(self, columnNumber):
        """
        :type columnNumber: int
        :rtype: str
        """
        

Related problems

Previous: Two Sum II - Input Array Is Sorted · Next: Dungeon Game · All problems

Zepruv is a technical interview practice platform. Read any problem for free; sign in to run your code, submit and keep your progress.