Company: Cashfree
Difficulty: medium
8. Programmer String 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 \'programmerpro\', \'grammerpro\', and \'prozmeragram\' 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. Function Description Complete the function programmerStrings in the editor below. programmerStrings has the following parameter(s): 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 Constraints String s consists of lowercase English alphabetic letters only, ascii[a-z] 1 ≤ the length of s ≤ 10 5 There will always be two non-overlapping programmer strings Example s = \'programmerxxxprozmeragram\' 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 p r o