You are given two sorted integer arrays. How will you find their intersection?
Let us assume array1 [ ] and array2 [ ] are the given two sorted arrays.
Time complexity = \( O(Length\ of\ array1\ +\ Length\ of\ array2) \). public static void findIntersection(int[] arr1, int[] arr2){ |