Count Ways To Build Good Strings | Leetcode 2466