4. Let \( X[1 \ldots n] \) and \( Y[1 \ldots n] \) be two sorted arrays each containing \( n \) elements. Give an \( O(\log n) \)-time algorithm to find the median of all \( 2n \) elements of \( X \) and \( Y \). (10分)
4. Let \( X[1 \ldots n] \) and \( Y[1 \ldots n] \) be two sorted arrays each containing \( n \) elements. Give an \( O(\log n) \)-time algorithm to find the median of all \( 2n \) elements of \( X \) and \( Y \). (10分)