Dsa
Strings
Easy
Anagram Pairs
Write a program that takes in a list of strings and returns the count of pairs of strings that are anagrams of each other. Anagrams are strings that can be rearranged to form the other.
Example:
Input:
['listen', 'silent', 'enlist', 'hello']
Output:
3
Key concepts
stringsanagramssorting
Practise this out loud — free
Start a mock interview on THIS exact question — a voice AI interviewer opens with it, pushes back like a real onsite, then hands you an instant scorecard.
🎙 Practise this question now