havelessbemore/hackerrank

String search

Opened this issue · 1 comments

You are given a long string as input in each testcase, containing any ASCII character. Your task is to find out the number of times SUVO and SUVOJIT appears in it.

Input Format

The first line contains the number of testcases, T. Next, T lines follow each containing a long string S.

Constraints

1 <= T <= 100

1 <= Length of each string <= 150

Output Format

For each long string S, display the no. of times SUVO and SUVOJIT appears in it.

Sample Input 0

3
SUVOJITSU
651SUVOMN
$$$$$SUVOSUVOJIT$$$$$
Sample Output 0

SUVO = 0, SUVOJIT = 1
SUVO = 1, SUVOJIT = 0
SUVO = 1, SUVOJIT = 1

Is overlapping allowed?