Excel Sheet Column Title
Solve this the way you would in the interview: out loud, on a timer, with an AI interviewer asking follow-ups while you code. You get a scored report at the end.
Practice this as a mock interviewFree to start, no account neededProblem
In a spreadsheet application, columns are labeled with letters instead of numbers. The first column is A, the 26th column is Z, the 27th column is AA, the 28th is AB, and so on.
Given a positive integer columnNumber, return its corresponding spreadsheet column title as a string.
The labeling follows a sequence similar to counting in base 26, but with an important twist: there is no digit that represents zero. Each position uses the letters A through Z (mapping to the values 1 through 26), so the scheme behaves like a *bijective* base-26 numeral system rather than ordinary positional notation.
Examples
Constraints
- `1 <= columnNumber <= 2^31 - 1`
- The answer fits comfortably in a standard string (at most 7 characters).
What the interviewer grades
A correct solution is one of five scores. The report also grades problem understanding (did you clarify inputs and edge cases before coding), problem solving, communication while you work, code quality, and testing. See a sample report, or read up on the pattern in the lessons.