Question 1
Input: racecar python radar hello world
Step 1: Palindromic words (read same forwards/backwards): racecar radar
Step 2: Non-palindromic words: hello python world
Step 3: Combine (palindromes first, then others, each sorted alphabetically): racecar radar hello python world
What is the final output?
Palindromic words first (alphabetically sorted), then non-palindromic words (alphabetically sorted): racecar radar hello python world