Excel Sheet Column Number🏍

A -> 1
B -> 2
C -> 3
...
Z -> 26
AA -> 27
AB -> 28
...
Input: columnTitle = "A"
Output: 1
Input: columnTitle = "AB"
Output: 28
Input: columnTitle = "ZY"
Output: 701
  • 1 <= columnTitle.length <= 7
  • columnTitle consists only of uppercase English letters.
  • columnTitle is in the range ["A", "FXSHRXW"].

Java Solution

Code

--

--

--

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

3 Month so far — Journey to becoming a fine Java Developer.

Visual Programming | Create Microservices/Monoliths Faster Than Cooking 2min Noodles

Scala — faster and slimmer with GraalVM

Getting Preliminary Commits of a local Repository into a Remote Repository

Write It Down

Configuration & Change Management — In DevOps.

Blog On Chropath…!!!!!!!

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Tehleel Mir 🐢

Tehleel Mir 🐢

More from Medium

“Delete and Earn” problem using Dynamic Programming

LeetCode Patterns Adventure 32 — Backspace String Compare

What is divide-and-conquer algorithm?

Connect Ropes(code and explanation)