Excel Sheet Column Number
Given a string columnTitle
that represents the column title as appears in an Excel sheet, return its corresponding column number.
For example:
1 | A -> 1 |
Example 1:
1 | Input: columnTitle = "A" |
Example 2:
1 | Input: columnTitle = "AB" |
Example 3:
1 | Input: columnTitle = "ZY" |
时间复杂度:O(n)
空间复杂度:O(1)
1 | class Solution { |