Leetcode 3045. Count Prefix and Suffix Pairs II | Hello Interview