a question about running time:
所在版块:求学狮城 发贴时间:2003-11-11 16:56

用户信息
复制本帖HTML代码
高亮: 今天贴 X 昨天贴 X 前天贴 X 
Which of the following is not true about binary heap?
A. It supports insert() in O(LogN) worst-case time;
B. It supports insert() in O(1) best-case time;
C. It supports findMin() in O(logN) average time;
D. It supports deleteMin() in O(logN) worst-case time;
I think A and B should be right. But not sure about C and D.
Thanks a lot!!!
.
欢迎来到华新中文网,踊跃发帖是支持我们的最好方法!

Put your OWN COOL signature here!
 相关帖子 我要回复↙ ↗回到正文
a question about running time: 最近不太好   (339 bytes , 590reads )
binary heap cannot perform insert in O(1). Flying   (64 bytes , 233reads )
But I think it can--> cigar   (183 bytes , 227reads )
sorry...I didn't notice the "best-case time" there Flying   (76 bytes , 220reads )
My thoughts--> cigar   (300 bytes , 233reads )
Correction: for max heap, delete mim should be cigar   (56 bytes , 298reads )