
Asked in VMware Software
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...
Top Member Technical Staff Interview Questions Asked at VMware Software
Q. Convert Array to Min Heap Task Given an array 'ARR' of integers with 'N' element...read more
Q. Tower of Hanoi Problem Statement You have three rods numbered from 1 to 3, and '...read more
Q. What is a page fault?
Interview Questions Asked to Member Technical Staff at Other Companies
Top Skill-Based Questions for VMware Software Member Technical Staff
Algorithms Interview Questions and Answers
250 Questions
Data Structures Interview Questions and Answers
250 Questions
Operating Systems Interview Questions and Answers
250 Questions
Web Development Interview Questions and Answers
250 Questions
Software Development Interview Questions and Answers
250 Questions
C++ Interview Questions and Answers
150 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

