CP164 Lecture Notes - Lecture 4: Prims, The Algorithm

16 views1 pages
School
Course
Professor

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.

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents