Given a string str and a pattern pat. You need to check whether pattern is present or not in the given string.
Input Format: The input line contains T, denoting the number of testcases. Each testcase contains two lines. First line contains string str. Second line contains patter text.
Output format: For each testcase in new line you have to print the "Present" if found otherwise "Not present".
User task: You need to complete the function searchPattern() containing string and text as an argument. You don't have to worry about input.
1 <= T <= 100
1 <= |str| <= 30
1 <= |text| <= 30
We strongly recommend solving this problem on your own before viewing its editorial. Do you still
want to view the editorial?
Login to access your submissions.