InterviewSolution
Saved Bookmarks
| 1. |
Given a positive integer, return its corresponding column title as appear in an excel sheet. |
|
Answer» MS 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”.Given a column number, find its corresponding Excel column name. Following are more examples.Input Output 26 Z 51 AY 52 AZ 80 CB 676 YZ 702 ZZ 705 AAC.. |
|