Python Program to Implement Binary Tree using Linked List

This is a Python program to implement a binary tree using a linked list. Problem Description The program creates a binary tree and presents a menu to the user to insert elements into the tree. Problem Solution 1. Create a class BinaryTree with instance variables key, left and right. 2. Define methods set_root, insert_left, insert_right, … Read more

advertisement

Python Program to Implement Doubly Linked List Operations

This is a Python program to create a doubly linked list and implement insertion, deletion and display operations on the list. Problem Description The program creates a doubly linked list and presents the user with a menu to perform various operations on the list. Problem Solution 1. Create a class Node with instance variables data … Read more

advertisement

Python Program to Implement Queue using Linked List

This is a Python program to implement a queue using a linked list. Problem Description The program creates a queue and allows the user to perform enqueue and dequeue operations on it. Problem Solution 1. Create a class Node with instance variables data and next. 2. Create a class Queue with instance variables head and … Read more

advertisement

Python Program to Implement Stack using Linked List

This is a Python program to implement a stack using a linked list. Problem Description The program creates a stack and allows the user to perform push and pop operations on it. Problem Solution 1. Create a class Node with instance variables data and next. 2. Create a class Stack with instance variable head. 3. … Read more

advertisement

Python Program to Print Alternate Nodes of a Linked List without Recursion

This is a Python program to print the alternate nodes of a linked list without using recursion. Problem Description The program creates a linked list using data items input from the user and displays the alternate data items. Problem Solution 1. Create a class Node. 2. Create a class LinkedList. 3. Define method append inside … Read more

advertisement

Python Program to Print Alternate Nodes of a Linked List using Recursion

This is a Python program to print the alternate nodes of a linked list using recursion. Problem Description The program creates a linked list using data items input from the user and displays the alternate data items. Problem Solution 1. Create a class Node. 2. Create a class LinkedList. 3. Define method append inside the … Read more

advertisement

Python Program Find the Length of Linked List without Recursion

This is a Python program to find the length of a linked list without using recursion. Problem Description The program prompts the user to enter the elements of the linked list to create and then displays its length. Problem Solution 1. Create a class Node. 2. Create a class LinkedList. 3. Define method append inside … Read more

advertisement

Python Program Find the Length of Linked List using Recursion

This is a Python program to find the length of a linked list using recursion. Problem Description The program prompts the user to enter the elements of the linked list to create and then displays its length. Problem Solution 1. Create a class Node. 2. Create a class LinkedList. 3. Define method append inside the … Read more

advertisement

Python Program to Count the Occurrences of Elements in a Linked List without Recursion

This is a Python program to count the number of occurrences of an element in a linked list without using recursion. Problem Description The program prompts the user for a key and displays the number of times the key occurs in the linked list. Problem Solution 1. Create a class Node. 2. Create a class … Read more

advertisement

Python Program to Count the Occurrences of Elements in a Linked List using Recursion

This is a Python program to count the number of occurrences of an element in a linked list using recursion. Problem Description The program prompts the user for a key and displays the number of times the key occurs in the linked list. Problem Solution 1. Create a class Node. 2. Create a class LinkedList. … Read more

advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.