I have given a question that there is given two array A and B are sorted in ascending order. I need to design an clogn time algorithm to find the median of all 2N integers. The question noted that the N may not power of 2. Hint to solve the question is find min and max of both array then change the input and make length to power of 2.
My current problem: Since two array are sorted so the first element will be min and last element will be max for both arrays. Then here how can i change the input and make the length to power of 2?