title: kth largest element in all possible products of two arrays
body: <p>Given two arrays <code>A</code> and <code>B</code> each of size <code>N</code> how to find the <code>K</code>th largest element among the set <code>X = {i x j | i ∈ A and j ∈ B}</code>?</p>
  
  <p>I came up with <code>O(N^2 log(n))</code> solution by forming the set <code>X</code>, sorting it and then finding element at <code>K</code>th position from last. Is there a better solution which has lower complexity?</p>