1class Solution:
2 def titleToNumber(self, columnTitle: str) -> int:
3 total = 0
4 for left, c in enumerate(reversed(columnTitle)):
5 char_index = (ord(c) - 64)
6 total += ((26)**left) * char_index
7
8 return total
Solution to "Count Number of Texts" question on Leetcode.
Solution to "Second Minimum Node In a Binary Tree" on Leetcode.