Week 11 Day 2 - Big O, Heaps, Hash Tables
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.