Do you know how to implement an algorithm to count all substring having character k.

https://learnersbucket.com/examples/algorithms/count-all-substrings-having-character-k/