Make a string from another string
Submissions: 491   Accuracy:

32.76%

  Difficulty: Easy   Marks: 2

Given two strings, find if the first string can be made from second by deleting some characters from second and rearranging remaining characters.

Input:
The first line consists of an integer T i.e number of test cases. The first line of each test case consists of string s1. The next line consists of string s2

Output:
If s1 could be made by s2 print "1" else print "0".

Constraints: 
1<=T<=100
1<=|Length of strings|<=1000

Example:
Input:

2
Hello
dnaKfhelddf
GeeksforGeeks
rteksfoGrdsskGeggehes

Output:
0
1

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

Contributor: Saksham Ashtputre
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.