Last2

Given a string, return the amount of times that the two last letters appear as a substring of the string. So "hixxxhi" yields 1 (we won't count the end substring) while "aaaNaa" yields 2 (substrings may overlap).

Questo esercizio รจ stato convertito per PLM dall'eccellente sito di esercizi http://javabat.com/