Showing 121 - 140 of 165 results
In this Python program, we will create a Python script to check whether a given number is prime or not....
In this Python program, we will implement a recursive approach to search for an element in a linked list. A...
This Python program explores Depth-First Search (DFS) traversal in a binary tree, specifically using the post-order technique. Post-order traversal follows...
This Python program uses recursion to generate the first n Fibonacci numbers and displays them in a list. Program Statement...
This Python program counts the number of words in a text file. Problem Statement You have been tasked with developing...
This Python program utilizes Depth-First Search (DFS) to find all reachable nodes in a given graph. DFS is a graph...
This Python program reads and prints the contents of a file in reverse order. Printing the contents of a file...
Recursion is a powerful programming concept where a function calls itself to solve a problem. In this Python program, we...
Dictionaries are versatile data structures in Python that allow you to map keys to corresponding values. This program demonstrates how...
This Python program implements a basic stack data structure with the following operations: In computer science, a stack is a...
This python program calculates the number of leaf nodes in a given tree data structure. Problem Statement Given a tree,...
In this Python program, we will leverage recursion to count the occurrences of elements within a linked list. This program...
In this Python program, we will create a class called SubsetGenerator to find all possible distinct subsets of a given...
Heap Sort is a popular comparison-based sorting algorithm that uses a binary heap data structure to efficiently organize and sort...
This Python program calculates the average of numbers in a given list. Problem Statement: Given a list of numbers, we...
This Python program aims to find the smallest divisor of a given integer. It prompts the user to enter an...
This Python program checks if two numbers are amicable numbers or not. Amicable numbers are pairs of numbers where the...
This Python program demonstrates the implementation of binary search using recursion. Binary search is an efficient algorithm to find a...
Selection Sort is a simple sorting algorithm that works by repeatedly selecting the minimum (or maximum) element from an unsorted...
Lists are versatile data structures in Python that allow you to store and manipulate collections of items. This program demonstrates...