CP164 Lecture Notes - Lecture 4: Prims, The Algorithm
Document Summary
Uses insert and remove, inserts into wherever rear is pointing - remove wherever first is pointing. Don"t use pythons built in . remove() function, it sucks and you"ll lose marks. You can only see what"s in a queue with the peek (just looks at first value) or pop (looks at and removes first value) functions. Which is more efficient, a log n algorithm or a n(log n)? use common sense, the second one is bigger. Here (not sure how make notes on this) - Big-o: o(1) / constant time complexity: the algorithm has no loops, then the algorithm is o(1), or of constant time complexity.