Number of Same-End Substrings - DSA Problem | Talentd