我举几题104台大电机丙的题目当例子
1.Given two linked list,its deletion operation can be O(logn)
我自己觉得这个应该是True,O(logn)应该可以包含O(1)
2.The height of a Binomial Heap of n nodes can be O(n)
我也觉得是True,理由同上
3.Given a fixed size array,the time complexity to remove the minimum
element can be O(1)
题目没有说它是不是sorted,如果是由大到小排好的话,直接砍掉最后一个就可以在
O(1)内完成了,所以他说can be我也觉得是对的
想问一下,我这样会太执著在can be这种字眼上吗?
还是题目原本就是要这样考的?