Python Tutorials - Singly Linked List | Program | Part 1

Pubblicato il: 25 settembre 2020
sul canale di: Amulya's Academy
297,779
5.8k

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:
class Node:
def __init__(self,data):
self.data = data
self.ref = None

class LinkedList:
def __init__(self):
self.head = None

def print_LL(self):
if self.head is None:
print("Linked list is empty!")
else:
n = self.head
while n is not None:
print(n.data)
n = n.ref

#DataStructures #PythonPrograms #LinkedList

For more free tutorials on computer programming
  / amulsacademy  
twitter.com/AmulsAcademy


In questa pagina del sito puoi guardare il video online Python Tutorials - Singly Linked List | Program | Part 1 della durata di online in buona qualità , che l'utente ha caricato Amulya's Academy 25 settembre 2020, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 297,779 volte e gli è piaciuto 5.8 mille spettatori. Buona visione!