We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4fffc85 commit feb1d16Copy full SHA for feb1d16
excel-sheet-column-number/README.md
excel-sheet-column-number/Solution.java
@@ -0,0 +1,18 @@
1
+public class Solution {
2
+ public int titleToNumber(String s) {
3
+ char[] S = s.toCharArray();
4
+
5
+ int n = 0;
6
7
+ int p = 1;
8
9
+ for(int i = S.length - 1; i >= 0; i--){
10
11
+ n += (S[i] - 'A' + 1) * p;
12
13
+ p *= 26;
14
+ }
15
16
+ return n;
17
18
+}
excel-sheet-column-number/index.md
@@ -0,0 +1,8 @@
+---
+layout: solution
+title: Excel Sheet Column Number
+date: 2014-12-28 23:03:17+08:00
+{% assign leetcode_name = {{page.path | remove: '/index.md'}} %}
+{% assign leetcode_readme = {{leetcode_name | append: '/README.md' | prepend: '_root/' }} %}
+{% include {{leetcode_readme}} %}
0 commit comments