现在$200能买到怎样的CPU+主板combo (个人桌面机)# Hardware - 计算机硬件
l*a
1 楼
用堆的话,扫描一次,time complexity O(Nlog2k) space complexity O(K).
if use quick select to find the Kth number,
then scan the 2nd time ,comparing the number with the kth one..
time complexity O(N),space complexity O(log2K)
scan time is more than the algorithm using heap.
看起来这地方有说道。。。
Correct me if i am wrong
if use quick select to find the Kth number,
then scan the 2nd time ,comparing the number with the kth one..
time complexity O(N),space complexity O(log2K)
scan time is more than the algorithm using heap.
看起来这地方有说道。。。
Correct me if i am wrong