Find starting index for every occurrence of given array B in array A using Z-Algorithm
Given two arrays A and B, the task is to find the starting index for every occurrence of array B in array A using Z-Algorithm.Examples: Input: A = {1, 2, 3, 2, 3}, B = {2, 3} Output: 1 3 Explanation: In array A, array B occurs at index 1 and index 3. Thus the answer is {1, 3}.Input: A = {1, 1, 1, 1,