Cells in a Range on an Excel Sheet Problem
Cells in a Range on an Excel Sheet Problem — ExecCode Easy DSA Practice
Solve the Cells in a Range on an Excel Sheet problem on ExecCode. Free online easy DSA practice in String. Write and run code in Java, C++, Python — no signup required to run.
Problem description
Description You are given a string s in the format " : ", where represents the column c1, represents the row r1, represents the column c2, and represents the row r2, such that r1 " where: - denotes the column number c of the cell. It is represented by alphabetical letters. For example, the 1^st column is denoted by 'A', the 2^nd by 'B', the 3^rd by 'C', and so on.
Examples
Input {"s": "K1:L2"}; Output ["K1", "K2", "L1", "L2"]. Input {"s": "A1:F1"}; Output ["A1", "B1", "C1", "D1", "E1", "F1"]. Input {"s": "K1:L2"}; Output ['K1', 'K2', 'L1', 'L2']
Constraints
s.length == 5 'A' <= s[0] <= s[3] <= 'Z' '1' <= s[1] <= s[4] <= '9' s consists of uppercase English letters, digits and ':'.
Practice Cells in a Range on an Excel Sheet free on ExecCode. Browse DSA problems, topic map, and placement guides.