AmitDiwan has Published 10740 Articles

Python Program to Implement Binary Tree using Linked List

AmitDiwan

AmitDiwan

Updated on 14-Apr-2021 13:31:38

648 Views

When it is required to implement a binary tree data structure using a linked list, a method to set the root node, a method to perform in-order traversal, to insert element to the left of the root node, a method to insert element to the right of the root node, ... Read More

Python Program to Implement Queue Data Structure using Linked List

AmitDiwan

AmitDiwan

Updated on 14-Apr-2021 13:26:46

2K+ Views

When it is required to implement a queue data structure using a linked list, a method to add (enqueue operation) elements to the linked list, and a method to delete (dequeue operation) the elements of the linked list are defined.Below is a demonstration for the same −Example Live Democlass Node:   ... Read More

Python Program to Implement a Stack using Linked List

AmitDiwan

AmitDiwan

Updated on 14-Apr-2021 13:22:00

4K+ Views

When it is required to implement a stack data structure using a linked list, a method to add (push values) elements to the linked list, and a method to delete (pop values) the elements of the linked list are defined.Below is a demonstration for the same −Example Live Democlass Node:   ... Read More

Python Program to Print the Alternate Nodes in a Linked List without using Recursion

AmitDiwan

AmitDiwan

Updated on 14-Apr-2021 13:18:54

357 Views

When it is required to print the alternate nodes in a linked list without using recursion, a method to add elements to the linked list, a method to display the elements of the linked list, and a method to get the alternate values of a linked list are defined.Below is ... Read More

Python Program to Print the Alternate Nodes in a Linked List using Recursion

AmitDiwan

AmitDiwan

Updated on 14-Apr-2021 13:16:13

184 Views

When it is required to print the alternate nodes in a linked list using recursion, a method to add elements to the linked list, a method to display the elements of the linked list, and a method to get the alternate values of a linked list are defined. Another helper ... Read More

Python Program to Count the Number of Occurrences of an Element in the Linked List without using Recursion

AmitDiwan

AmitDiwan

Updated on 14-Apr-2021 13:13:17

239 Views

When it is required to count the number of occurrences of a specific element in a linked list without using recursion, a method to add elements to the linked list, a method to display the elements of the linked list, and a method to count the occurrences of a value ... Read More

Python Program to Count the Number of Occurrences of an Element in the Linked List using Recursion

AmitDiwan

AmitDiwan

Updated on 14-Apr-2021 13:11:12

474 Views

When it is required to count the number of occurrence of a specific element of a linked list with the help of recursion, a method to add elements to the linked list, a method to print the elements of the linked list, and a method to count the occurrence of ... Read More

Python Program to Find the Length of the Linked List without using Recursion

AmitDiwan

AmitDiwan

Updated on 14-Apr-2021 13:07:54

216 Views

When it is required to find the length of a linked list without using recursion, a method to add elements to the linked list, and a method to calculate the length of the linked list is defined.Below is a demonstration for the same −Example Live Democlass Node:    def __init__(self, data): ... Read More

Python Program to Find the Length of the Linked List using Recursion

AmitDiwan

AmitDiwan

Updated on 14-Apr-2021 13:05:11

243 Views

When it is required to find the length of a linked list with the help of recursion, a method to add elements to the linked list, and a method to calculate the length of the linked list is defined. A helper function is defined that is called with the help ... Read More

Python Program to Display the Nodes of a Linked List in Reverse without using Recursion

AmitDiwan

AmitDiwan

Updated on 14-Apr-2021 13:02:14

233 Views

When it is required to display the nodes of a linked list in reverse without using the method of recursion, a method to add elements to the linked list, and a method to display the elements in reverse order is defined.Below is a demonstration for the same −Example Live Democlass Node: ... Read More

Advertisements