→ icrts:b e 忘了 O(n) T 忘了 不確定? 03/07 20:20
1.which sorting algorithm has best performance when the given data is
nearly sorting ?
(a) selection sort
(b) insertion sort
(c) bubble sort
(d) heap sort
2.if we only count the data movement, which of the following sorting algorithm
has the best time complexity ?
(a) quick sort
(b) merge sort
(c) heap sort
(d) insertion sort
(e) selection sort
3.what is the average time complexity to search in a Min-heap data structure?
4.what is the worst case time complexity to search in a binary search tree?
5.(T/F)There are sorting algorithms that have O(N) worst case time complexity
6.(T/F)The worst casetime complexity of Dijstra's shortest path algorithm
is O(n^3)
7.what data structure is needed if we want to implement a priority queue with
O(log n) performance both for insertion and deletion
這些時間複雜度這邊不是很懂~~~手邊的資料又找不太到~~
麻煩高手幫解答一下~~~感恩!!!
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 111.249.62.217
※ 編輯: wadekobe324 來自: 111.249.46.176 (03/07 15:30)