I was recently asked this question in an interview.
Initially, I was asked to reverse a sentence without using inbuilt String api methods like split etc.
I/p : I like god O/p : god like I
I did this using a stack. His next question was to accomplish this without using additional memory.
How do we achieve this in java?
Thanks!