I was asked this in an interview question to come up with a method that takes in a string like "999" and then increments it by 1, and then returns a new string like "1000".
He said the constraint was you cannot convert directly from string to integer, although you can convert a character into an integer.
I understand that it's rather simple code for a case like "488" where you just have the last character '8', convert it to integer to increment and return "489".
But how do you do the carry over logic for a case like "999"?