Week 6 Day 2 - Linked Lists Part III
First we talked about how to debug problems with your code when you're working with pointers. You're going to seg fault at some point, and so learning how to use ASAN (address sanitizer) and GDB (GNU Debugger) will be lifesavers.
Today we got into more complicated linked list functions. We implemented the following:
1) Find - searches through the list to see if an element is in it or not
2) InsertAfter - adds a new person to the list after a specified name
It's really important to read through your textbook so you understand conceptually what is happening, and before you write code with Linked Lists, to sketch it out on paper. Every time you erase a line or change where something is pointed... turn that into a line of code! And if you don't know how to convert an arrow on paper into a line of code, it's probably better to ask rather than guessing. If you don't have a good conceptual understanding, your code will be bad, and you'll feel sad.
Other Videos By Bill Kerney
2021-02-25 | Week 7 Day 2 - Vector Math |
2021-02-25 | Week 7 Day 2 - Pipelining |
2021-02-24 | Week 7 Day 2 - Debugging II and Queues |
2021-02-24 | Week 6 Day 2 - Midterm Review |
2021-02-23 | Week 7 Day 1 - The Triangle in Games |
2021-02-23 | Week 7 Day 1 - Classes in C and Assembly |
2021-02-23 | Week 6 Day 1 - Fallacies III |
2021-02-22 | Week 7 Day 1 - Using Invariants to Debug Linked Lists |
2021-02-20 | Week 5 Day 2 - Fallacies II |
2021-02-19 | Week 6 - Auto Landscapes |
2021-02-19 | Week 6 Day 2 - Linked Lists Part III |
2021-02-18 | Week 6 Day 2 - Auto Landscapes |
2021-02-18 | Week 6 Day 2 - Range Based Loops in Assembly |
2021-02-17 | Week 5 Day 1 - Invalid / Valid / Sound Arguments II |
2021-02-17 | Week 6 Day 1 - C++ Trivia: Const |
2021-02-16 | Week 6 Day 1 - Water and Landscapes III |
2021-02-16 | Week 6 Day 1 - Midterm Review and Generations of Architectures |
2021-02-12 | Week 4 Day 3 - Invalid / Valid / Sound Arguments |
2021-02-12 | Week 5 Day 2 - Dynamic Materials II - Water |
2021-02-11 | Week 5 Day 2 - Syscalls |
2021-02-11 | Week 4 Day 2 - Fallacies Part 1 |