Problem title
Difficulty
Avg time to solve

Paths in a Maze
Easy
--
Positive Negative Pair
Easy
10 mins
Christmas Eve
Easy
15 mins
Letter Combinations of a Phone Number
Moderate
35 mins
Left Rotations of An Array
Moderate
10 mins
Connect Nodes at Same Level
Moderate
30 mins
Minimum Time To Solve The Problems
Hard
50 mins
Implement a phone directory
Hard
50 mins
Longest Bitonic Sequence
Moderate
15 mins
Find K-th smallest Element in BST
Easy
15 mins
6

Excel Column Number

Difficulty: EASY
Contributed By
Anish De |Level 1
Avg. time to solve
23 min

Problem Statement

You have been given a column title as appears in an Excel sheet, return its corresponding column number.

For example:
A -> 1
B -> 2
C -> 3
...
Z -> 26
AA -> 27
AB -> 28 
...
Input Format
The only line of input contains a string S i.e. column title 
Constraints:
1 <= |S| <= 10
Input contains only uppercase English Alphabet letters

Time Limit : 1 sec
Output Format
The only line of output will print the column number corresponding to given column title 
Sample Input 1
AB
Sample Output 1
28
Sample Input 2
ZZZ
Sample Output 2
18278
Reset Code
Full screen
copy-code
Console