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