Company: Cashfree_12may
Difficulty: medium
Programmer String Problem Description A programmer string contains letters that can be rearranged to form the word 'programmer' and is a substring of a longer string. Note that the strings 'programmer', 'grammproer', and 'prozmerqgram' are all classified as programmer strings by this definition. Given a string, determine the number of indices that lie between the rightmost and leftmost programmer strings that it contains. Complete the function programmerStrings in the editor below. The function programmerStrings has the following parameter: string s : a string containing 2 programmer strings Returns: int : the number of indices which are between the rightmost and leftmost programmer strings within s Examples Example 1: Input: s = 'programmerxxxprozmerqgram' Output: 3 Explanation: In this example, indices 0 - 9 form one programmer string and indices 13 - 24 contain another. There are 3 indices between the programmer, so the function will return 3. Example 2: Input: s = 'progxrammerrxpro