Inserting/Adding Elements After The Given Node in The Linked List | Python Program

preview_player
Показать описание
In this Python Programming video tutorial you will learn about how to implement Linked List data structure in python in detail.

Data structure is a way of storing and organising the data so that it can be accessed effectively.
Linked List is a linear data structure made up of chain of nodes in which each node contains a data field and link or reference.

To implement Singly Linked List we are using class concepts here.

Program:
def add_after(self,data,x):
while n is not None:
break
if n is None:
print("node is not presesnt in LL")
else:
new_node = Node(data)

#DataStructures #PythonPrograms #LinkedList

For more free tutorials on computer programming
Рекомендации по теме
Комментарии
Автор

Ohh god this channel is soo underrated... :(

mehedifahim
Автор

I personally never comment, but after watching your videos, I really want to say that you are just awesome at explaination.

jasbir
Автор

I have Watched your complete series on LL, was searching for an LL explanation in python. Great explanation, articulate it was. Thank you

priyadarshinivenkatesan
Автор

Amulya, ...Really nice, and well balanced both practically and theoritically.
thank you.

shashankgowda
Автор

One of the best channel to learn dsa in python ... understood linked list by watching your videos at first time itself ... nice explanation

harshsawant
Автор

Best channel ever Tq so much with lots of love ❤

rajyalakshmigonaboina
Автор

For this difficult topic you made it so easy to understand! what an excellent explaination!

study_with_thor
Автор

What a great clarity in teaching data structures!! 😃😃😃

srinidhibandi
Автор

Your channel is the reason why I have not dropped Computer Science yet. Thanks a lot...!!!

pappujha
Автор

best channel i have ever found on DSA course.worth watching ur videos

jonahsayyed
Автор

Mam I will never forget your "chuck" . 😚

AnuragKharade
Автор

Amazing voice with wonderful explanation

developmentwithsachin
Автор

You have explained very well mam
Thanks for providing a very nive titerial

mdarsad
Автор

Ohh God..
U r Fantastic..
Thank You soo much 🥺

curlieditz
Автор

Mam, I have just thought of different way of coding to this same topic ..like if we assume x as position where we want to insert node, assuming that first node starts from zeroth position .if we follow this method we would not be able to write different codes for After node and before node... Below is the code..


def insert_after_nodes(self, data, x):
newnode=node(data)
temp=self.head
i=1
while(i<x): #x is the position where you want to insert a node , considering the fact that index of node 1 starts from zero, and it works from inserting from 1st posiition because our loop starts from 1
temp=temp.ref
i=i+1
newnode.ref=temp.ref
temp.ref=newnode

tripurarikumarjha
Автор

You Are Amazing !!! your Explanation is Amazing
you helped me a lot Thank you !!!!

baherualemu
Автор

I really love you video, it's very clear and detailed. ps: this is my first time to comment

yuanran
Автор

Nice video mam plz complete this series as soon as possible plz

kalpeshmali
Автор

Thank u so much akka for ur teaching ☺️☺️☺️

funbox
Автор

Shit. I have wasted my money on useless DS course on Udemy. I wish I found your course somewhat earlier... Thanks Amulya

manojt