Practice Excel Sheet Column Number
Read the task, work through the examples, and check your approach against the constraints. Use the original LeetCode task for coding and submissions.
Problem Statement
Convert an Excel column title to its positive column number. Letters A through Z represent values 1 through 26. Read the title from left to right in base 26 using those values: A is 1, Z is 26, AA is 27 and AB is 28.
Source: Excel Sheet Column Number on LeetCode. Use the original task for its coding environment and submissions.
Examples
# Example 1
Input
columnTitle = "A"
Output
1
# Example 2
Input
columnTitle = "AB"
Output
28
# Example 3
Input
columnTitle = "ZY"
Output
701
Constraints
1 <= columnTitle.length <= 7
columnTitle consists only of uppercase English letters.
columnTitle is in the range ["A", "FXSHRXW"].
Related LeetCode Problems
Practice more problems similar to Excel Sheet Column Number.
Review your practice with PhantomCodeAI
After trying the problem yourself, use the app to discuss your approach, complexity, and edge cases.