CT2177

The Word Reversal of Prismhaven

EasyL2 · Byte BanditAcceptance: 0.0%XP: 10

It is audit day at the glass towers of Prismhaven. Tomas spreads the scrolls records across the table and picks up a sharp pencil. Task: Read a line of space-separated words and print the words in reverse order. Input format: One line with words separated by single spaces. Output format: Print the words in reverse order, single-spaced. Constraints: 1 <= |s| <= 87; s contains lowercase English letters.

Example 1:

Input: uo qnu ie biw cfpzx rrlpvtr tvv ufzaaccjoc w tppgnqtpivn huqmxxeyz ouucusie
Output: ouucusie huqmxxeyz tppgnqtpivn w ufzaaccjoc tvv rrlpvtr cfpzx biw ie qnu uo

Example 2:

Input: adp eri bwmweyskbp tivphevt zu rq io bkrdvpy
Output: bkrdvpy io rq zu tivphevt bwmweyskbp eri adp

Example 3:

Input: zdyeedklr pslz
Output: pslz zdyeedklr

Constraints:

1 <= |s| <= 87; s contains lowercase English letters.

Loading...
Test Cases:No test cases
No test cases available.
The Word Reversal of Prismhaven - EASY Coding Problem | CodeTikki