Skip to content

Commit

Permalink
Create Excel Sheet Column Number.py
Browse files Browse the repository at this point in the history
  • Loading branch information
resorcap committed Mar 8, 2015
1 parent 428fe2a commit 80be243
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Excel Sheet Column Number.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
class Solution:
def titleToNumber(self, s):
num = 0
for i in s:
num *= 26
num += ord(i) - 64
return num

0 comments on commit 80be243

Please sign in to comment.