Wednesday, 5 March 2014

Problem 3

Given a line with W words separated by spaces. Reverse the order of words in the line.

Sample Input:
this is first input
Sample Output :
input first is this

Sample Input:
Aman
Sample Output :
Aman

Sample Input:
I Will be next DCL champ
Sample Output :
champ DCL next be Will I

No comments: