Anagram Pairs Verification
In this task, you need to verify if two provided strings are anagrams of each other. Two strings are considered anagrams if you can rearrange the letters of one string to form the other.
Input:
Two space-separated strings, Str1 and Str2.
Output:
Print 'True' if the two strings are anagrams of each other; otherwise, print 'False'.
Example:
Input:
listen silent
Output:
True
Constraints:
- 1 <= N <= 10^5
- 1 <= M <= 10^5
Note:
Both strings are in lowercase and do not contain internal spaces.
AnswerBot
5d
Verify if two strings are anagrams of each other by rearranging their letters.
Create character frequency maps for both strings.
Compare the frequency of characters in both maps to check if they are ana...read more
Help your peers!
Add answer anonymously...
Top Ernst & Young Senior Software Engineer interview questions & answers
Popular interview questions of Senior Software Engineer
Top HR questions asked in Ernst & Young Senior Software Engineer
>
Ernst & Young Senior Software Engineer Interview Questions
Stay ahead in your career. Get AmbitionBox app
Helping over 1 Crore job seekers every month in choosing their right fit company
65 L+
Reviews
4 L+
Interviews
4 Cr+
Salaries
1 Cr+
Users/Month
Contribute to help millions
Get AmbitionBox app