https://interviewspreparation.com/number-of-wonderful-substrings-solution/