g*********s 发帖数: 1782 | 1 here the problem is asking which of the following, case 2?
1. "abc xyz" => "cba zyx"
2. "abc xyz" => "xyz abc" | j*****u 发帖数: 1133 | 2 yes, case 2
first reverse whole string, then reverse each words
【在 g*********s 的大作中提到】 : here the problem is asking which of the following, case 2? : 1. "abc xyz" => "cba zyx" : 2. "abc xyz" => "xyz abc"
| z****s 发帖数: 532 | 3 search for delimiters in your string | g*********s 发帖数: 1782 | 4 how about commas and the period?
【在 j*****u 的大作中提到】 : yes, case 2 : first reverse whole string, then reverse each words
| j*****u 发帖数: 1133 | 5 ask the interviewer! :P
【在 g*********s 的大作中提到】 : how about commas and the period?
|
|