September 2023

Showing 161 - 180 of 184 results
This Python program finds the sum of elements in a list using recursion. Recursion is a programming technique where a...
Recursion is a powerful programming concept where a function calls itself to solve a problem. In this Python program, we...
In this Python program, we will demonstrate how to combine two lists into one and then sort the resulting merged...
This Python program defines a function swap_first_last(lst) that swaps the first and last elements in a list lst. Here’s how...
In this Python program, we’ll create a script to find the largest number in a given list of numbers. Problem...
This Python program calculates the number of words and characters in a given input string. Program Statement: Given a string,...
This Python program splits a list of numbers into two separate lists: one containing even elements and the other containing...
This Python program finds the largest even and largest odd numbers in a given list. Problem Statement: Given a list...
This Python program calculates the average of numbers in a given list. Problem Statement: Given a list of numbers, we...
In this Python program, we’ll create a recursive function to determine how many times a given letter occurs in a...
In this Python program, we’ll create a program that finds the second largest number in a list of integers. We’ll...
This Python program sorts a list of elements based on their lengths in ascending order. It demonstrates how to use...
In this tutorial, we will learn how to create a Python program that counts the occurrences of a given letter...
This Python program implements Depth-First Search (DFS) on a graph using recursion. DFS explores as far as possible along each...
This Python program implements a D-ary heap, which is a generalization of the binary heap where each parent node has...
This Python program implements a ternary heap, which is a type of min-heap where each parent node has up to...
This Python program finds the Minimum Spanning Tree (MST) of a weighted, connected graph using Prim’s algorithm. The MST is...
This Python program checks if an undirected graph is bipartite using BFS and a color-coding approach. A bipartite graph can...
In this Python program, we will use Breadth-First Search (BFS) to find all reachable nodes in a graph starting from...
This Python program implements Breadth-First Search (BFS) on a graph using a queue. BFS is used to traverse or search...

Categories

Archives