Save this video free

CS 238 Week 11 Lecture

James Andro-Vasko · 24:08 · Watch on YouTube

Part of University of Nevada, Las Vegas CS 238. See all 9 lectures and search them

These notes were made with YouTube Collector. Paste any YouTube link and get the same: a summary, chapters and a searchable transcript.

Overview

The lecture explains how a singly linked list stores data in nodes connected by next references rather than in contiguous array memory, making front insertion and removal efficient. It traces Python implementations of push_front, insert_after, remove, printing, and pop_front, showing how traversal and pointer updates change the list.

Key takeaways

Chapters

0:00 Linked-List Nodes, References, and Memory Layout
4:00 push_front: Building a List in Constant Time
10:18 Traversing Nodes to Insert or Remove by Position
20:45 pop_front and Verifying the List Operations

Keep these chapters and the full searchable transcript in your own library.

Transcript excerpt

0:01 Hello CS238 class. Uh for this week we're going to be talking about a link list data structure. Now this is sort of more important when we talk about languages like C, C++ and even assembly language where you have more direct access to memory allocation deallocation which you kind of don't have that type of access when you talk about languages like Python uh Java and C kind of give you some illusion of that but really it's more direct in uh C++ or C. So in Python you've probably used numpy or list structures looking at the code on the left side over here. Consider a list like this. You have elements 10 11 7 and 5 and they are um continuous or

0:49 contiguous to each other. So they're arranged side by side. You can access elements of a list either using a rangebased loop or you can of course use the list followed by the index. So index zero would access 10, index one for 11 and so forth. So um in C++ or C you have dynamic arrays or list structures but you have to of course manually um implement them and you have an alternative to this dynamic array structure which would be a link list which here is the image of a link list right here. So even though we can draw link list to look continuous or contiguous it's really in memory these elements are kind of scattered all over the place and then we use these references these pointers references here to kind of glue these elements together to kind of form an illusion of

1:40 a continuous uh list type structure. And really the benefit of this structure in C++ is if you need to uh resize it, it's requires a lot less overhead than

This is the start of the transcript. Save this video free for the whole transcript, searchable and time-coded.

In this course

Related notes

Summary, takeaways, and chapters were generated by AI from the video's transcript and may contain errors. The video belongs to its creator, James Andro-Vasko.

Want the full transcript?

Save this video in YouTube Collector to get its complete searchable transcript, your own AI summaries, and a library that keeps every video you collect in one place.