-->
当前位置:首页 > 题库

单选题:Consider two disjoint sorted arrays $$A[1\ldots m]$$ and $$B[1\l

Luz5年前 (2021-06-19)题库1111
Consider two disjoint sorted arrays $$A[1\ldots m]$$ and $$B[1\ldots n]$$, we would like to compute the $$k$$-th smallest element in the union of the two arrays, where $$k \leq \min\{m, n\}$$. Please choose the smallest possible running time among the following options.



A.$$ O(\log k)$$
B.$$ O(\log m )$$
C.$$O(\log n)$$
D.$$O(\log m + \log n)$$


答案:A