Week 11 Day 2 - Big O, Heaps, Hash Tables

Channel:
Subscribers:
2,640
Published on ● Video Link: https://www.youtube.com/watch?v=pd6PsClkyC4



Duration: 1:29:43
117 views
1


Today we spent more time with Big O, explaining why certain operations have certain running times, and learning how to think about some scenarios where there is no one right answer to the question of "which option is better?" as it will often include factors outside your control, like how often the user wants to do Option A over Option B.


I then did some back of the napkin calculations of how long various computations would take to run if they were O(logN) vs. O(N) vs. (N^2), etc.


We then set up the reason why priority queues (aka Heaps) exist, and gave some example code for using BSTs and Hash Tables in the standard library, and showed how much using hash tables could speed up the ELO running time.


Finally, I gave a brief explanation of how hash tables work, with more to come.







Tags:
csci 41
heaps
hash tables
big-O