Java Anagram Strings
Submissions: 1640   Accuracy:

43.25%

  Difficulty: Basic   Marks: 1

Given two strings S and A . Print "1" if both strings are anagrams otherwise print "0" .

Input: First line of input contains a single integer T which denotes the number of test cases. T test cases follows, first line of each test case contains a string S. Second and last line of each test case consists of string A.

Output: Corresponding to each test case, print the required output.

Constraints:

1<=T<=100
1<= length(S and A) <=1000


Example:

Input:
2
cdbkdub
dsbkcsdn
geeks
skgee

Output:
0
1

** For More Input/Output Examples Use 'Expected Output' option **

Contributor: S_A
Author: saksham0751


If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.



Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.


to report an issue on this page.