Remove Linked List Elements (LeetCode 203) | Quick and Easy Explanation | Study Algorithms

  Рет қаралды 9,200

Nikhil Lohia

Nikhil Lohia

Күн бұрын

Пікірлер: 22
@FrazAhmed-sd8df
@FrazAhmed-sd8df Ай бұрын
amazing explanation thank you I was starting at head and getting it wrong now I understand why we need dummy in traversal to accomplish task
@minnikeswarrao6185
@minnikeswarrao6185 2 жыл бұрын
One small improvisation can be done... To change the head and tail pointers when the node to be deleted is one of them... However you are just awesome mann🤩
@ArunaSrivastava-xb5eq
@ArunaSrivastava-xb5eq Жыл бұрын
You are the best, lots of love from seattle
@nikoo28
@nikoo28 Жыл бұрын
Thank you so much. I have been to Seattle too :D
@shivraj940
@shivraj940 Жыл бұрын
Implement queue using Linked List : Its very simple . we don't have to think much on this. 4 operation of Queue Data structure : FIFO 1. Enqueue() -> Simply insert the element in tail part -> TC : O(1) 2. Dequeue() -> Simply move head ie) head = head.next -> TC : O(1) 3. front() -> head.val -> TC:O(1) 4. isEmpty() -> return head == null -> TC:O(1)
@CodeOs5
@CodeOs5 2 жыл бұрын
sir can you comment the name of book that u mentioned in one of your video for ds algo
@nikoo28
@nikoo28 2 жыл бұрын
The book is always available in every video description :)
@ymhuang651
@ymhuang651 2 жыл бұрын
Keep Going!🤩
@nikoo28
@nikoo28 2 жыл бұрын
🚀
@jayprakashjaiswal8220
@jayprakashjaiswal8220 Жыл бұрын
nice explaination bhaiya
@honey-xr5kp
@honey-xr5kp 8 ай бұрын
what is that x: -1 when you create the dummy head node? I've never seen that before.
@atharv_rege5869
@atharv_rege5869 7 ай бұрын
that x is the variable or parameter in which -1 is stored
@atharv_rege5869
@atharv_rege5869 7 ай бұрын
it is just the data part of the dummy node because we dont actually need the data of the dummy node
@tanishbagal5521
@tanishbagal5521 3 ай бұрын
nice explaination
@subee128
@subee128 11 ай бұрын
Thanks
@Upendrachauha23
@Upendrachauha23 10 ай бұрын
What about this node [5,5,5,5,5]🤔🤔
@nikoo28
@nikoo28 9 ай бұрын
what is the value of 'val'?
@preetnandeshwar5331
@preetnandeshwar5331 9 ай бұрын
@@nikoo28 val = 5
@atharv_rege5869
@atharv_rege5869 7 ай бұрын
@@nikoo28 bhaiya what if the the node which is updated itself contains the val because we are actuallly checking the data of the next node but if the present node contains the data then it will not be removed na?? like if the ll is 1-> 2 -> 3 -> 3 -> 4 and the val is 3
@zerkinanastya4410
@zerkinanastya4410 Жыл бұрын
Thank you dearly for the video! It helps a lot! But could you please explain the (x:-1) notation in new ListNode(x:-1); and how it will look like in js? Bc I can create a dummy node in js with this notation: let dummy = new ListNode(); or I can pass 0 or -1 in ListNode(-1) or ListNode(0) and it still works. Why should we write -1. I am new to programming, so if only you could explain…🙏I would be much grateful!
@allahs_creation233
@allahs_creation233 Жыл бұрын
increase volume
@nikoo28
@nikoo28 Жыл бұрын
it should be better in the latest videos. :)
Contiguous Array - Leetcode 525 - Python
15:41
NeetCodeIO
Рет қаралды 29 М.
Увеличили моцареллу для @Lorenzo.bagnati
00:48
Кушать Хочу
Рет қаралды 9 МЛН
SIZE DOESN’T MATTER @benjaminjiujitsu
00:46
Natan por Aí
Рет қаралды 7 МЛН
How Much Tape To Stop A Lamborghini?
00:15
MrBeast
Рет қаралды 248 МЛН
Noodles Eating Challenge, So Magical! So Much Fun#Funnyfamily #Partygames #Funny
00:33
Remove Linked List Elements - Leetcode 203
7:51
NeetCode
Рет қаралды 65 М.
2 Years of C++ Programming
8:20
Zyger
Рет қаралды 7 М.
I gave 127 interviews. Top 5 Algorithms they asked me.
8:36
Sahil & Sarra
Рет қаралды 675 М.
Увеличили моцареллу для @Lorenzo.bagnati
00:48
Кушать Хочу
Рет қаралды 9 МЛН