Domanda di colloquio di Yahoo

Write a routine to reverse a string and then reverse only the individual words in the same string using the routine.

Risposta di colloquio

Anonimo

3 ott 2009

To reverse only the words: 1) Reverse the entire string 2) Reverse again just the substrings on white-space boundaries. The words are now forward but in reverse order.

2