Vectors, arrays, lists, and matrices: there are so many ways to hold data! This type of structure doesn't mind if you go out of bounds, but be careful what you find or touch there!
What is an array?
The humble pointer is rather simple. If you are given one, you know you have this type of information at least for a given data type!
What is a memory address?
"A chain is only as strong as its weakest link," so they say. Those links are called Nodes when referencing Linked Lists, and the simplest Nodes are usually composed of these two things.
What are data and a pointer to the next Node?
FIFO & LIFO are common terms in computer science that map to these two data structures respectively that help us maintain order.
What are queues and stacks?
In a binary search apple tree, big apples fall to this side, while small apples fall to this side.
What is right and left?
Linear search is slower than binary search on average, but it has a unique advantage since it does not require the data to be ________.
What is ordered?
Sometimes, you need to look at the thing itself, not just get pointed to it. Well, then use this symbol to perform this action on the pointer!
What is the asterisk (*) and dereference?
You'll be in a "heap" of trouble if you forget to delete a Node that was allocated to this type of memory.
What is dynamic memory?
Redo what needs to be done or undo what you wish you never did by using these two stack operations, respectively.
What are push and pop?
The height of a binary tree doesn't need any fancy measurement tools. You can just count the number of these things, which ironically, matches the name of a common measurement tool.
What are levels?
Enjoy bubbles? 🫧 Then you would know bubble sort usually has ______ exchanges than selection sort, a more selective algorithm.
What is more?
This special type of object is a lot like a pointer since it lets you access each individual element in a container.
What is an iterator?
Stay ahead of the game! Or at least make sure that the head Node is non-null before using this C++ operator to get the next Node.
What is the arrow operator (->)?
Dekes in hockey help you achieve your goals! Deques in programming also help you achieve this doubly beneficial goal!
What is FIFO and/or LIFO behavior?
Looking for the perfect apple in your perfectly balanced binary search tree with 64 apples? Well, rest easy knowing it will take this many steps at most!
What is 6 steps?
Timber! From binary search to divide-and-conquer algorithms, taking the log of the input data size tells you how many of these types of hacks you'd have to take at them.
What are steps (or operations)?
If you want to get where you're going, maybe you could use this associative container found in the C++ Standard Library, unless you want only one way to get there, then use this one.
What is a map and a set?
Linked Lists are stronger than Arrays for several reasons, including these two common operations which complement each other well.
What is insertion and removal?
Voicemail box full? Use this data structure to ensure future messages will be heard appropriately!
What is a queue?
Know your roots. We all know it is _____ that the root of a binary search tree is the largest node in the tree!
What is false?
I select you, Pikachu! Ash Ketchum used Selection Sort on his Pokémon: Pikachu, Caterpie, Pidgeotto, Bulbasaur, Charmander. He wanted them lined up in alphabetical order, and after the second pass, he got this arrangement, which is close, but no cigar!
What is Bulbasaur, Caterpie, Pidgeotto, Pikachu, Charmander?
What is the emplace function?
This code is a little wrong, right? Gosh, maybe I am the weakest link... No, wait, this line is wrong!
1. ~LinkedList() {
2. Node* curr = head;
3. while (curr->next) {
4. Node* garbage = curr;
5. curr = curr->next;
6. delete garbage;
7. }
8. head = nullptr;
9. }
What is line 3?
"Do you know how long the line is?" If not, perhaps that means the queue has this trait which allows line-standers to stand anywhere but still in order!
What is be dynamic?
Binary trees are useful but sometimes hard to manage. Thankfully, folks that make this type of software that needs indexing can use amazing data structures like Red-Black trees or AVL trees to ensure our trees are nice and balanced.
What are databases?