Count Prefix And Suffix Pairs Ii Leetcode