Max Inserts to Obtain String Without 3 Consecutive ‘a’ Microsoft OA 2023
Max Inserts to Obtain String Without 3 Consecutive ‘a’ Solution Write a function solution that, given a string S consisting of N characters, returns the maximum number of letters ‘a’ that can be inserted into S (including at the front and end of S) so that the resulting string doesn’t contain 3 consecutive letters ‘a’. … Read more