Given input string = "ABCDABCATRYCARCABCSRT" and pattern string = "CAT". Find the first index of the pattern match using Quick search algorithm.
2
6
11
14
Answer and explanation
Using Quick search algorithm, searching starts from the leftmost character and finds the first occurrence of the pattern "CAT" at index 6.
