Check Permutation Problem Statement

Given two strings 'STR1' and 'STR2', determine if they are anagrams of each other.

Explanation:

Two strings are considered to be anagrams if they contain the same characters, regardless of the order.

Input:

The first line contains an integer 'T' denoting the number of test cases.
The first and only line of each test case contains two space-separated strings 'STR1' and 'STR2'.

Output:

For each test case, return true if the two strings are anagrams, otherwise return false.
Output each result on a new line.

Example:

Input:
T = 1
STR1 = "listen" STR2 = "silent"
Output:
true

Constraints:

  • 1 <= T <= 100
  • 1 <= |STR1|, |STR2| <= 103

Where |STR1| and |STR2| are the lengths of the strings 'STR1' and 'STR2' respectively.

Time limit: 1 sec

Be the first one to answer
Add answer anonymously...
VMware Software Member Technical Staff 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