Zocdoc interview question

words reversal without char array and without o(n) space