Linked List Class Invariants + Queues + Stacks + Big O
We covered four big topics today:
1) How to think about invariants when you're doing your code. Basically, if there is a rule that has to be followed, every time you have a function that changes an object, you have to really stare at it and make sure that all the invariants will always be maintained.
2) Queues are ADTs that support two main commands: pushing at the back and popping off the front. They're used in real life in a lot of situations involving buffering, which is to say that one thing is producing data and another thing is consuming data, so you put a queue between them to mediate the relationship. They are a FIFO (first in first out) data structure.
3) Stacks are an ADT that are kinda the opposite of queues. They support pushing and popping off the top of the stack. They're used in a lot of contexts, such as the stack, doing parenthesis matching, and so forth. They are a LIFO (last in first out) data structure.
4) Big O is the main way we talk about the running time of algorithms and data structure operations in computer science. It is how we answer the question, "How much slower will this code run as the data structure gets bigger?"
Other Videos By Bill Kerney
2022-03-09 | Privacy, Cognitive Biases I |
2022-03-09 | Radial Damage weapons |
2022-03-09 | Barycentric Coordinates + Z-Buffering |
2022-03-07 | Binary Search Trees II |
2022-03-07 | Fallacies Part IV - |
2022-03-02 | Fallacies Part III |
2022-03-01 | Animating a Character in Unreal Engine using Mixamo |
2022-02-28 | Big O (Part II) + Binary Search Trees |
2022-02-28 | Fallacies Part I |
2022-02-25 | ACM Workshop: Python Workshop 2 |
2022-02-25 | Linked List Class Invariants + Queues + Stacks + Big O |
2022-02-25 | Midterm I Review Part II |
2022-02-24 | UE4 Water Plugin + Projectile Weapons |
2022-02-23 | UNCC's BRIDGES |
2022-02-23 | Midterm Review + Ethics of Autonomous Vehicles |
2022-02-22 | Week 7 - Voronoi 2: Lloyd's Algorithm + Edge Detection |
2022-02-16 | Lecture 42 - Lambda Functions, Pointer Loops, Function Pointers, Life |
2022-02-16 | The Housing Crisis |
2022-02-15 | Voronoi Regions |
2022-02-14 | Linked Lists III - Inserting and Deleting from the Middle |
2022-02-14 | Ethics (Part IV): Virtue Ethics |