Question: 4. Design an algorithm such that Input: Array A of m strings of Latin letters of length at most n Output: The maximum number k

4. Design an algorithm such that Input: Array A of m strings of Latin letters of length at most n Output: The maximum number k such that there exist k strings in the input that are anagrams of each other. The complexity of the algorithm should be O(mn +mlogm Example: Let A = [ "abba", "abe", "cba", "abbb", "baba", "cca", "bbaaj. Then the output should be 3, because words "abba", "baba", and "bbaa" are anagrams
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
