Company: BNY Codedivas 2026
Difficulty: medium
Recursion Count As a language enthusiast, assume you love analyzing words and finding patterns in them. Consider that you have been given a challenge to find all the possible ways to read the word "recursion" in a given input string S, with the condition that the characters must appear sequentially, as they appear in the order r, e, c, u, r, s, i, o, n. Your task is to find and return the total count of unique occurrences of the word "recursion" that can be read from left to right in the given string. Note: The result should be returned modulo 10 9 + 7. Input Specification: input1 : A string S, representing a sequence of characters. Output Specification: Return an integer representing the total count of unique occurrences of the word "recursion" that can be read from left to right in the given string. Example 1: input1 : rerecursion Output : 3 Explanation: Given the input string "rerecursion", all possible instances of the word "recursion" can be found out in the following ways: Starti