Leetcode solving: 1078 Occurrences After Bigram