Uber | OA | Count occurrence of one string in another string
245
Sep 14, 2022
Sep 14, 2022
Given two strings s and t. Count the number of occurence of 't' in 's' as follows:
- Length of t is 3,
- Increment count when
t == s[i]s[i+2]s[i+4]
Example:
s = aabbcc
t = abc
output = 2
Comments (1)


