Given 2 sorted arrays, get the i-th element without sorting to a single array
Sigiloso
Here is the pseudo code int p -> a int q -> b int resIdx = 0; while(i > 0 && (p < a.length || q < b.length) ){ if(a[p] < b[q]) p++; resIdx = p; else q++; resIdx = q; i--; } return resIdx; There are some corner cases that's not covered but this would be the main logic.