Long time no coding, each line needs a
cplusplus.com look up : (
Analysis
Programming is straightforward. Extract words from input string using space as delimiter. Write words back to input string in reverse order.
Code
http://fmarss.blogspot.com/2014/10/divide-array-into-sub-arrays.html
Coding Note
- Clarification is very important during the interview (Yu's Coding). Make sure following trifles such as
- what's the delimiter
- only lower case letters included?
- leading trailing or multiple space contained?
- empty string input?
Divide an array by given delimiter and perform calculation on each sub array. Code Template can be found here