Excel Sheet Column Number Problem

Excel Sheet Column Number Problem — ExecCode School DSA Practice

Solve the Excel Sheet Column Number problem on ExecCode. Free online school DSA practice in Math. Write and run code in Java, C++, Python — no signup required to run.

Problem description

Given an Excel sheet column title (e.g., 'A', 'AB'), compute its corresponding column number. Your task is to solve Excel Sheet Column Number. For example, 'A' is 1, 'B' is 2, and 'AA' is 27.

Examples

Input A; Output 1. Input Z; Output 26

Constraints

1 <= columnTitle.length <= 7

Practice Excel Sheet Column Number free on ExecCode. Browse DSA problems, topic map, and placement guides.