168-Excel-Sheet-Column-Title

Sat 17 May 2025

https://leetcode.com/problems/excel-sheet-column-title

import pyutil as pyu
pyu.get_local_pyinfo()
print(pyu.ps2("python-dotenv"))
from typing import List
class Solution:
  def convertToTitle(self, n: int) -> str:
    return self.convertToTitle((n - 1) // 26) + \
        chr(ord('A') + (n - 1) % 26) if n else ''
new Solution().convertToTitle()

Score: 5

Category: leetcode