168. Excel Sheet Column Title Posted on 2020-05-12 | Edited on 2021-01-22 | Views: https://leetcode.com/problems/excel-sheet-column-title/ 1234567891011121314151617181920// because String is an immutable type, // using StringBuilder -> 0ms; using String -> 7ms.class Solution_1 { public String convertToTitle(int n) { StringBuilder res=new StringBuilder(); while(n>0){ n--; res.insert(0,(char)('A'+n%26)); n/=26; } return res.toString(); }}// recursion method (keep rewriting the immutable String type)class Solution_2 { public String convertToTitle(int n) { return n == 0 ? "" : convertToTitle(--n / 26) + (char)('A' + n % 26); }}