2

PROBLEM OF THE DAY: 03/10/2023 | Column name from a given column number

 11 months ago
source link: https://www.geeksforgeeks.org/videos/problem-of-the-day-03102023-column-name-from-a-given-column-number/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Column name from a given column number

October 04, 2023 |1.7K Views
PROBLEM OF THE DAY: 03/10/2023 | Column name from a given column number
Problem of the Day, String, Data Structure and Algorithm
 Save  Share  1 Like
Description
Discussion

Welcome to the daily solving of our PROBLEM OF THE DAY with Siddhartha Hazra. We will discuss the entire problem step-by-step and work towards developing an optimized solution. This will not only help you brush up on your concepts of Strings but will also help you build up problem-solving skills.

In this problem, we are given, a positive integer, return its corresponding column title as appear in an Excel sheet.
Excel columns has a pattern like A, B, C, … ,Z, AA, AB, AC,…. ,AZ, BA, BB, … ZZ, AAA, AAB ….. etc. In other words, column 1 is named as “A”, column 2 as “B”, column 27 as “AA” and so on.

Example :

Input:
N = 28
Output: AB

Explanation: 1 to 26 are A to Z. Then, 27 is AA and 28 = AB.

Give the problem a try before going through the video. All the best!!!

Problem Link: https://practice.geeksforgeeks.org/problems/column-name-from-a-given-column-number4244/1

Read More

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK