How to reverse the sequence of words in a sentence ?

5.23K viewsProgramming

For eg:- Input is “This is a test”
Output should be:- “Test a is this”

How to write a program for this ?

Changed status to publish

Loop through split strings by space and push to string array in reverse order

Answered question
You are viewing 1 out of 2 answers, click here to view all answers.
Write your answer.