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