โ† Amazon questions

Print pairs of anagrams line by line

Filed under Amazon

Given a comma-separated string of words, identify and print pairs of words that are anagrams of each other (case-insensitive) line by line. Print -1 if no such pairs exist.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Amazon questions

Collected from public candidate posts and coding forums. Updated Nov 2026.