Company: Arista_27_Dec
Difficulty: medium
Count Subsequences Problem Description Given two strings, find out how many times the first string appears as a subsequence within the second string. A subsequence is formed by removing any number of characters (including zero) from a string without altering the order of the remaining characters. Complete the function getSubsequenceCount in the editor. The function must return the number of times s1 appears as a subsequence in s2 . Function Signature: long getSubsequenceCount(string s1, string s2) Parameters: string s1 : the first string, which always has a length of 3. string s2 : the second string. Returns: long : the number of times s1 appears as a subsequence in s2 . Example Input: s1 = "ABC" s2 = "ABCABC" Output: 5 Explanation: The string s1 appears 5 times as a subsequence in s2 at 1-indexed positions of (1, 2, 3), (1, 2, 7), (1, 4, 7), (1, 6, 7), and (5, 6, 7). The answer is 5. (Note: The example explanation seems to refer to a different s2 as the indices go up to 7, while the p