#250. last2
last2
Background
Description
Given a string, return the count of the number of times that a substring length 2 appears in the string and also as the last 2 chars of the string, so "hixxxhi" yields 1 (we won't count the end substring).
Format
Input
Output
Samples
hixxhi
1
xaxxaxaxx
1
axxxaaxx
2
Limitation
1s, 1024KiB for each test case.