Comments

Why does the given implementation work in $$$O(k \log n)$$$? It seems that when $$$\max{t_1} \lt \min{t_2}$$$, it is $$$O(\log^2 n)$$$ instead of $$$O(\log n)$$$.