Skip to main content

Posts

Featured

LinkedList in Python

In this post, we'll get to know how we can implement LinkedList in Python. #singly LinkedList # forst we'll create a class to create nodes class Node :     def __init__ ( self ,data = None , next = None ) :         self . data = data       #assigning data to the data variable         self . next =next       #initializing next node as null (None in python) # creating class for linked list class LinkedList :     def __init__ ( self ) :         self . head = None   #initializing head pointer         def insert_at_beginning ( self , data ) :         node = Node ( data , self . head )       #next will point to head of next node         self . head = node                 #head will point to new node which is inserted at beginning     def insert_a...

Latest Posts

Handling user defined exceptions in Python

Leetcode Longest Common Prefix Solution.

Fibonacci Series

Chef vs Bharat Codechef solution. July Challenge 2021.