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

AnswerBot
4mo
Check if two strings are anagrams of each other by comparing their characters.
Create a character frequency map for both strings and compare them.
Sort both strings and compare if they are equal.
Use a h...read more
Help your peers!
Add answer anonymously...
VMware Software Member Technical Staff interview questions & answers
A Member Technical Staff was asked Q. Convert Array to Min Heap Task Given an array 'ARR' of integers with 'N' element...read more
A Member Technical Staff was asked Q. Tower of Hanoi Problem Statement You have three rods numbered from 1 to 3, and '...read more
A Member Technical Staff was asked Q. What is a page fault?
Popular interview questions of Member Technical Staff
A Member Technical Staff was asked Q1. Convert Array to Min Heap Task Given an array 'ARR' of integers with 'N' element...read more
A Member Technical Staff was asked Q2. Tower of Hanoi Problem Statement You have three rods numbered from 1 to 3, and '...read more
A Member Technical Staff was asked Q3. What is a page fault?
>
VMware Software Member Technical Staff Interview Questions
Stay ahead in your career. Get AmbitionBox app


Trusted by over 1.5 Crore job seekers to find their right fit company
80 L+
Reviews
10L+
Interviews
4 Cr+
Salaries
1.5 Cr+
Users
Contribute to help millions
AmbitionBox Awards
Get AmbitionBox app

