Leetcode 2955. Number of Same-End Substrings | Hello Interview