Anagrams Revisited
Practice
3.5 (111 votes)
Map
Sorting
Easy
Hash table
Data structures
Problem
85% Success 2823 Attempts 20 Points 1s Time Limit 256MB Memory 1024 KB Max Code

Arnab is a robber and he has managed to rob N different strings from Akash. Now he decides to sell these strings in the market to make some profit. But, of all the strings he has, he wants to find the size of the largest anagram group so that he can easily sell that one first and make maximum profit initially. Help him find the largest size of groups of anagrams.

An anagram of a string is another string that contains same characters, only the order of characters can be different. For example, “abcd” and “dabc” are anagram of each other.

Input:
First line of input contains an integer N, number of total strings. Next N lines contains a single string S.

Output:
Print the largest size of group of anagrams possible.

Constraints:
\( 1\le \)N\( \le 100000\)
\( 1 \le |S| \le 50\)

Please login to use the editor

You need to be logged in to access the code editor

Loading...

Please wait while we load the editor

Loading...
Results
Custom Input
Run your code to see the output
Submissions
Please login to view your submissions
Similar Problems
Points:20
18 votes
Tags:
Hash tableData StructuresEasyOpenApprovedHash function
Points:20
12 votes
Tags:
Hash tableHashMapBasic ProgrammingEasyOpenApproved
Points:20
12 votes
Tags:
Hash tableHashMapBasic ProgrammingEasyOpenApproved