Reversing a linked list

  Рет қаралды 6,953

CodeVault

CodeVault

4 жыл бұрын

Check out our Discord server: / discord

Пікірлер: 9
@jameslaurino9158
@jameslaurino9158 2 жыл бұрын
I remember when I studied data structure. Your course help me a lot to understand the core logic. It's always seems not easy in C or C++ language especially for beginner but learn it is really useful. For instance to understand how high level languages like Java, c#, etc. work with that. It's a very important topic. And thank you to explain it in a really great way. I always recommend your channel for my student and for everyone who want to learn C even if they don't speak English like me :) . Keep going!
@Woshii1
@Woshii1 3 жыл бұрын
Your videos are amazing. You're a great teacher. Keep it up!
@n33to
@n33to 3 жыл бұрын
Thank you, you’re a marvelous teacher. 👍🏻💻📚
@LuigiDiPaolo-vw4xs
@LuigiDiPaolo-vw4xs 11 ай бұрын
Great explanation, thank you
@bernalgas-oo6gu
@bernalgas-oo6gu 8 ай бұрын
thank you ma bro
@rawadbader4441
@rawadbader4441 3 жыл бұрын
I think it would be easier to understand the logic oh you're switching the nodes around because I got so confused when you explained it I had to run it in the deguber to understand what happened. Basically current, previous, and next they are like sublist after they go inside the function this why you were able to switch them around.
@tarekhamdoudi3144
@tarekhamdoudi3144 4 ай бұрын
Thank you for the explanation. My question is what if the linked list is more than 3 elements long?
@CodeVault
@CodeVault 4 ай бұрын
The same program should work for any number of elements in the linked list. It was just easier to explain using 3 elements
@user-ir8nd6mj2b
@user-ir8nd6mj2b Жыл бұрын
9:30 my recursive solution: ``` Node *reverse(Node **node, Node *prev) { if(*node == NULL) return prev; Node *next = (*node)->next; (*node)->next = prev; return *node = reverse(&next, *node); } ``` Just call it like that: reverse(&root, NULL);
Finding loops/cycles in a linked list
9:26
CodeVault
Рет қаралды 4,2 М.
Sorted linked list
18:11
CodeVault
Рет қаралды 16 М.
Идеально повторил? Хотите вторую часть?
00:13
⚡️КАН АНДРЕЙ⚡️
Рет қаралды 8 МЛН
Slow motion boy #shorts by Tsuriki Show
00:14
Tsuriki Show
Рет қаралды 10 МЛН
A teacher captured the cutest moment at the nursery #shorts
00:33
Fabiosa Stories
Рет қаралды 55 МЛН
Adding elements to a linked list
18:46
CodeVault
Рет қаралды 39 М.
Learn Linked Lists in 13 minutes 🔗
13:24
Bro Code
Рет қаралды 275 М.
Why Function Pointers are Awesome
11:11
Jacob Beningo
Рет қаралды 6 М.
Removing an element from a linked list
13:15
CodeVault
Рет қаралды 14 М.
Reverse a linked list - Iterative method
13:50
mycodeschool
Рет қаралды 774 М.
every good programmer should know how to code this data structure (its easy)
21:08
LinkedList vs ArrayList in Java Tutorial - Which Should You Use?
11:43
Coding with John
Рет қаралды 582 М.
LeetCode - Reverse Linked List Solution
7:02
Nick White
Рет қаралды 122 М.
Идеально повторил? Хотите вторую часть?
00:13
⚡️КАН АНДРЕЙ⚡️
Рет қаралды 8 МЛН