Question bank › Strings
Dsa Strings Easy

Reverse Words in Sentence

Write a function that reverses the order of words in a given sentence. Preserve the order of characters in each word. Input format: - A single line containing the sentence to reverse. Output format: - A single line with the words in reversed order. Example: Input: The quick brown fox Output: fox brown quick The

Key concepts

stringsreversesplit

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
Part of InterviewLab's verified interview question bank. We show the prompt and concepts to practise with — never a copy-paste solution.