Dsa
Strings
Easy
Reversed Letter Groups
Given a string, reverse the order of the words in the string while keeping the letters in each word in the same order. Words are separated by spaces.
Input Format:
- A single line containing the input string.
Output Format:
- A single line with the words in reversed order.
Example:
Input:
Hello there World
Output:
World there Hello
Key concepts
stringsmanipulationslicing
Practise this out loud — free
Start a mock interview on THIS exact question — a voice AI interviewer opens with it, pushes back like a real onsite, then hands you an instant scorecard.
🎙 Practise this question now