Easy Linked Lists, Recursion, Unions

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



Duration: 1:10:14
151 views
2


Today we ran through a really simple example of how to make a linked list, how they can go wrong in terms of not deleting, double deleting, and use after freeing. We started by making them manually and then working on some more automated ways of playing with them.

We'll study them more in 41 including a more proper and encapsulated way of doing them.

We went over recursion a bit, too.

A student then asked about unions, which are one of the more obscure corners of C. C++ has replaced them mostly with variants, but they still have some uses in networking code or to minimize memory consumption when you know variables couldn't be needed at the same time.







Tags:
csci 40
recursion
linked lists
lists
unions
c++