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.
Be the first one to answer
Add answer anonymously...
Amazon Software Developer Interview Questions
Stay ahead in your career. Get AmbitionBox app
qr-code
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

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter