Couldn't understand why we should do n-1


It would be nice if there is some good explanation clearly about why we should do n-1 / 26 when n%26 == 0. I have spent around 3 hours trying to understand and reading articles and everyone is just saying to use it without giving clear step-by-step explanation.


See if this explanation helps:

(Source: different website. Contact for credits/link to original author.)


Thnx. Can you please post a link to that article ?


There you go: 168. Excel Sheet Column Title


But why is 26 * 26^3 + 2626^2 +2626 + 26 an issue? It seems to fit the table above in the screenshot?