LeetCode编程练习
来源:互联网 发布:java视频教程数组 编辑:程序博客网 时间:2024/06/06 20:42
题目:
Related to questionExcel 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
在Excel表中显示一个列标题,返回相应的列编号。
思路:
之前有一道题是输入数字显示字母,跟此题恰好相反,只要将上道题的算饭倒过来就可以了,不过,值得注意的是,两道题对比,上道题输入的是int型,也就是十进制数,输出的是string型,也就是26进制字母,此题就应该相对应,输入string型,输出int型,由于输入是string型,还要考虑字符串遍历的问题。
参考: Excel Sheet Column Title
阅读全文
0 0
- LeetCode编程练习
- LeetCode编程练习
- LeetCode编程练习
- LeetCode编程练习
- LeetCode编程练习
- LeetCode编程练习
- LeetCode 编程练习
- LeetCode编程练习
- LeetCode编程练习
- LeetCode编程练习
- LeetCode编程练习
- LeetCode编程练习
- LeetCode编程练习
- LeetCode编程练习
- LeetCode编程练习
- LeetCode编程练习
- LeetCode编程练习
- LeetCode编程练习
- MySQL_函数GROUP_CONCAT_合并多行数据到一行
- 安装激活 Mindjet MindManager
- 小声哔哔
- 【Java】CompletionService 使用
- 神经机器翻译(Neural Machine Translation)系列教程
- LeetCode编程练习
- AbstractQueuedSynchronizer的介绍和原理分析
- LeetCode编程练习
- Fragment知识点,一篇搞定!
- LeetCode编程练习
- LeetCode编程练习
- LeetCode编程练习
- LeetCode编程练习
- LeetCode编程练习