Write a function that returns the common elements (as an array) between two sorted arrays of integers (ascending order). Example: The common elements between
[1, 3, 4, 6, 7, 9]and[1, 2, 4, 5, 9, 10]are[1, 4, 9]. REMINDER: Use lists instead of arrays in Python for simplicity.
I've written an implementation that determines the solution in O(max(n + m)) time complexity, where n is the number of elements in array 1, and m is the number of elements in array 2.
Languages Implemented: