Substrings That Avoid a Pattern Subsequence

Company: PhonePe_30sep

Difficulty: medium