Number of Same-End Substrings

mediumSolve on LeetCodeLast edited: August 2, 2025