← Amazon questions

Count total anagram pairs in an array of strings

Filed under Amazon

Given an array of strings, count the total number of pairs (i, j) such that i < j and strings[i] is an anagram of strings[j].

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.