Please consider offering answers and suggestions to help other students!
And if you fix a problem by following a suggestion here,
it would be great if other interested students could see a short
"Great, fixed it!" followup message.
merge() is O(n) and mergesort() is O(n log(n)). mergesort() repeatedly divides the array into subarrays until each subarray is size 1. This halving takes O(log(n)) steps and forms a complete binary tree with depth log(n). And for each level of divis...
Hello,
I have watched the lectures and still do not understand why Kruskal's is (m n)log n. Please clarify how the complexity arises.
If there are m edges in the priority queue with m-weights, total cost of priority queue operations should be m log(m)....
Hello,
Q3 (b) of 2019 exam asks to show n(log(n)) 2 O(n 2). I do not know how to derive an upper-bound of n for the (log(n)) 2 term. Please explain how I might derive this mathematically. Thank you
Hello,
I am wondering when answering questions like these from the past exams
"Explain clearly Kruskal s minimum spanning tree algorithm." 5 marks
or
"Explain clearly the inorder and postorder traversals of binary trees" 5 marks
What are each of ...