Given two integer arrays A and B, find the length of the longest contiguous subarray that appears in both arrays. If multiple exist, return any one pair of starting indices as well. Discuss possible approaches (e.g., dynamic programming, binary search with rolling hash) and analyze time and space complexity.