Excel Sheet Column Number Part 1 gfg GeeksforGeeks Daily Challenge | Amazon

preview_player
Показать описание
Given a positive integer N, return its corresponding column title as it would appear in an Excel sheet.
For N =1 we have column A, for 27 we have AA and so on.

Note: The alphabets are all in uppercase.

Example 1:

Input:
N = 51
Output: AY
Your Task:
Complete the function ExcelColumn() which takes N as input and returns output string

Check out our other playlists:

Dynamic Programming:

Trees:

Heaps and Maps:

Arrays and Maths:

Bit Manipulation:

Greedy Algorithms:

Sorting and Searching:

Strings:

Linked Lists:

Stack and Queues:

Two Pointers:

Graphs, BFS, DFS:

Backtracking:

Non- DSA playlists:

Probability:

SQL-Basic Join functions:

SQL-Basic Aggregate functions:
Рекомендации по теме
Комментарии
Автор

Your Explanation is very nice and easy to understand

deepakgaroda
Автор

Fantastic, Thank you. you have deep understanding of math. I appreciate your help

MTB_Bay_Area
Автор

I am an experience proffesional of 10 years, in testing just trying to learn dsa and algo, to add value in my skill set, this is something which i read in my academics but never thought it could be ralatable this way, very nice explaination. Thank you so much !!

anjalimishra
Автор

Time complexity -> O(LOG(N))
string ans = "";
while(N)
{
int rem = N%26;
if(rem==0)
{
ans = "Z"+ans;
N=N/26-1;
}
else
{

char c = 'A' + rem - 1;
N/=26;
ans = c+ans;

}

}

return ans;

probabilitycodingisfunis
Автор

Excellent explanation about the tricky "Z" case. I really appreciate it.

yusenpeng
Автор

Always search for your video only, no time waste as u come to the point very quickly and best explanation

mdsaquibansari
Автор

You are very very awesome explainer even better than most of coaching institute guys

AmanSharma-vbjl
Автор

Amazing Explanations! Whenever im stuck on leetcode, i always come to your channel to look for solutions or tips!. Please keep up the good work!

harshafartale
Автор

wow, thanks for explaining behind the scenes...

bharathkumar
Автор

Nicely explained
Can you tell me how you choose questions worth making a video ????

amanprajapati
Автор

Can u please solve "step by step" question of interviewbit in maths section

muskancreativity
Автор

Thanks a lot for an amazing explanation!!🤓

somyatomar
Автор

Amazing Explanations! Whenever im stuck on leetcode, i always come to your channel to look for solutions or tips!. Please keep up the good work!

asadjutt