Skip to main content
LeetCode 168, Easy. Topics: Math, String. View on LeetCode. Generate this problem as a practice environment: tested reference solution, 18 parametrized pytest cases, and a playground notebook:

Problem

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

Examples

Constraints

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

Solution

Reference implementation from solution.py on GitHub, full suite in test_solution.py:

Complexity

Tags

NeetCode 250, NeetCode All.
Last modified on August 25, 2026