Skip to content
0:00 / 0:00

#linkedlist#pointers

Understanding and implementing a Linked List in C and Java

Jacob Sorber

195K subscribers • 5 videos on Hallway

YouTube
  • Recommended by 3 people: 3 in engineering communities.
  • Presented by Jacob Sorber

Beginner. No background in the topic needed.

317K views7 years ago3 recommendations

Computer scienceProgramming languagesData structuresCJava and the JVM

Jacob Sorber explains the concepts behind linked lists and demonstrates how to implement them in both C and Java.

Patreon ➤ patreon.com/jacobsorber Courses ➤ jacobsorber.thinkific.com Website ➤ jacobsorber.com --- Understanding and implementing a Linked List in C and Java // Linked lists are one of the most fundamental data structures that any computer programmer needs to understand and be able to use. It's linear, like an array, but makes it much easier and faster to insert items into the list and remove things from the middle of the list. This video describes the basic concepts behind linked lists and provides code examples in both C and Java to help you get started. Follow-on video about doubly-linked lists: youtu.be/KFbm6lkMhgw *** Welcome! I post videos that help you learn to program and become a more confident software developer. I cover beginner-to-advanced systems topics ranging from network programming, threads, processes, operating systems, embedded systems and others. My goal is to help you get under-the-hood and better understand how computers work and how you can use them to become stronger students and more capable professional developers. About me: I'm a computer scientist, electrical engineer, researcher, and teacher. I specialize in embedded systems, mobile computing, sensor networks, and the Internet of Things. I teach systems and networking courses at Clemson University, where I also lead the PERSIST research lab. More about me and what I do: jacobsorber.com people.cs.clemson.edu/~jsorber/ persist.cs.clemson.edu/ To Support the Channel: + like, subscribe, spread the word + contribute via Patreon --- [patreon.com/jacobsorber] + rep the channel with nerdy merch --- [teespring.com/stores/jacob-sorbers-store] Source code is also available to Patreon supporters. --- [jsorber-youtube-source.herokuapp.com/] Want me to review your code? Email the code to js.reviews.code@gmail.com. Code should be simple and in one of the following languages: C, C++, python, java, ruby. You must be the author of the code and have rights to post it. Please include the following statement in your email: "I attest that this is my code, and I hereby give Jacob Sorber the right to use, review, post, comment on, and modify this code on his videos." You can also find more info about code reviews here. youtube.com/watch?v=k2K2HVg4Arc

Why it's here

3 people recommend this

What people say. Recommended as a clear tutorial for understanding and implementing linked lists.

u/sometimesih8thisshitin r/C_Programming • Recommends

On “Code to Remove Element from Array”

Here's a great video on the topic - link to this video Like I said, what you've done is fine, but if you want to push yourself to improve, then linked lists are definitely something you'll want to get comfortable with. You can come back to this sub or this comment to carry on the convo if you're having difficulty!

u/ACynicalJoein r/C_Programming • Recommends

On “How to store custom objects into an array”

in my opinion, a linked list would be more adapted to your needs here. It's a type of struct that contain a pointer to another struct of the same type . here is a tutorial : [video that would allow you to easely extend your list as you want to add more objects in it and to always have the right amount of memory allocated. Buf if you still want to use an array, creating a constant for the array size would be a good solution, then you could juste use gcc -D to change the constant when you compile.

u/No_Statistician_9040in r/C_Programming • Recommends

On “New project: Data structures”

…st is great at, since the list is connected by pointers, it is just as fast inserting at the start as it is at the end or wherever inside of the list you want. And yes, if your payload is a void\* it can point to any datatype you want. you might want to take a look at an existing implementation if you cant figure out how it all fits together: [video…