168. Excel Sheet Column Title 發表於 2023-02-13 | 分類於 leetcode problemsolution12345678910111213class Solution {public: string convertToTitle(int columnNumber) { string ret; while(columnNumber){ int mod = (--columnNumber)%26; char c = mod+'A'; ret = c+ret; columnNumber/=26; } return ret; }}; analysis time complexity O(n) space complexity O(1)