If understand the question correctly, considering the post text as input - "make it inplace" should be transformed into "inplace it make".
We can do it in two fold. Reverse the string by exchanging (1, n), (2, n-1), so on. Using space as delimiter, reverse each word of reversed string by exchange approach.
If understand the question correctly, considering the post text as input - "make it inplace" should be transformed into "inplace it make".
ReplyDeleteWe can do it in two fold. Reverse the string by exchanging (1, n), (2, n-1), so on. Using space as delimiter, reverse each word of reversed string by exchange approach.
Is there any other approach?