Since both the array are sorted, then we can apply the BINARY SEARCH
Array 1
Array 2
Suppose searching element=X
First apply the BINARY search in array 1, if element found then well and good
TC will be ○(logn)
But
If element not found in array 1,then appy the BINARY search in array 2,again in will take logn time ,but
Now,overall time must be 2logn but asymtotically the TC WILL BE = ○(logn)