Although many languages have linked lists libraries for you to use, it's important to understand how they might work under the surface. In this video, learn how to implement your own linked list in Java.
- [Instructor] How do we use linked lists…in a programming language?…Let's start with Java and create a linked list from scratch.…We'll scroll down here, select Java,…and delete all of this code and replace it…with some new code.…To implement a linked list,…we can create two blueprints or classes…to define what a linked list is,…as well as how we can operate on this data structure.…One of these blueprints will define our linked list…and the other will define a node.…Technically, these are called classes,…but you can think of them as blueprints…because they define exactly what the item is…and how to create one.…
We won't get too deep in this object-oriented terminology,…but let's take a look at this code.…What does a linked list consist of?…It has a bunch of nodes.…As we talked about before,…you can access every node in a linked list…if you have access to the first node…or the head of the list.…This means we only need to keep track…of the first node in our list to keep track…of the entire linked list,…but what exactly is in this node?…
- Data types: Booleans, numbers, strings, and more
- Multidimensional arrays
- Jagged arrays
- Search and sort arrays
- Linked lists
- Stacks and queues
- Hash functions and hash tables
- Trees and graphs
Skill Level Intermediate
Understand data structures1m 25s
1. Introduction to Data Structures
4. Stacks and Queues
5. Hash-Based Data Structures
6. Trees and Graphs
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.