title: An algorithm to find the nth largest number in two arrays of size n
body: <p>I have this question:</p>
  
  <blockquote>
    <p>Given two sorted lists (stored in arrays) of size n, find an O(log n)
    algorithm that computes the nth largest element in the union of the
    two lists.</p>
  </blockquote>
  
  <p>I can see there is probably a trick here as it requires the nth largest element and the arrays are also of size n, but I can't figure out what it is. I was thinking that I could adapt counting sort, would that work? </p>