##题目
####Excel Sheet Column Number
Related to question Excel Sheet Column Title
Given a column title as appear in an Excel sheet, return its corresponding column number.
For example:
A -> 1 B -> 2 C -> 3 ... Z -> 26 AA -> 27 AB -> 28
####Credits:
Special thanks to @ts for adding this problem and creating all test cases.
##解题思路
该题是Excel Sheet Column Title的翻转,给出字母序列得到对应的单元格数字,这个其实只要找到每一个字母对应的数字,然后乘以其所在的位置的26的次方即可,类似于将字符串数字转化为整数数字。
##算法代码
代码采用JAVA实现:
1 |
public class { |
近期评论