JavaScript Data Structures - 24 - Linked List with Tail Implementation

preview_player
Показать описание

📱 Follow Codevolution

Linked List with Tail Implementation
JavaScript Data Structures
Data Structures in JavaScript
Рекомендации по теме
Комментарии
Автор

I also want to note if you kept the code from previous videos, that the reverse() method will cause removeFromEnd() to crash.

What you need to do to fix this is:

this.tail = this.head; <-- you need to add this
this.head = prev;

mrjackyliang
Автор

Bro keep do videos of this DSA on explaining different algorithms and do videos on importtant leet code questions in java scripts

tarundurbha
Автор

there is a bug in removeFromFront method, when there is one node in linked list and head and tail both point to it, the head will become nulll but the tail will still point to the same node, tail should also have been set to null

muhammadahmedjaved
Автор

Thanks, you
we really need this type of videos
keep Working sir.

akhilkhan
Автор

Hi, sir
I have a question. That is the time complexity of removeFromEnd function is linear or constant.
According to me I think linear time complexity as while loop is used in that function.
Please ans me

codeseriespro
Автор

Note: if you are referencing the reverse method based on the Linked List class with no tail demonstrated in previous videos, you must re-assign this.tail to this.head, before proceeding to the while loop that uses the "current" variable.

SwiftDreamer
Автор

Please next time increase the font size.

inteliconn