Posts by Vamsi Krishna

Author Biographical Info: Not available

Python program to print cousins of a given node in Binary Tree

By Vamsi Krishna

In this tutorial, we shall be printing the cousins of a given node in Binary Tree in Python. The cousins of the given node are the nodes that are at the same level as the given nod.... Read More

Python program to find maximum difference between two subsets of m elements

By Vamsi Krishna

In this tutorial, we will calculate the maximum difference between two subsets of an array in Python. To calculate the max difference between two subsets of an array of length n, w.... Read More

Find k numbers with most occurrences in the given Python array

By Vamsi Krishna

In this tutorial, we shall find k numbers with most occurrences in the given Python array. The inputs shall be the length of the array, its elements, and a positive integer k. We s.... Read More

C++ Program to find all prime numbers in a Linked List

By Vamsi Krishna

In this tutorial, we shall be printing all the prime numbers in a Linked List. Given a singly linked list, the aim is to print the nodes containing a prime number. A prime number i.... Read More

Implement stack using list in Python

By Vamsi Krishna

In this tutorial, we shall implement a stack using list in Python. A stack is a Linear Data Structure that uses a LIFO (Last In First Out) methodology. Unlike other programming lan.... Read More

How to Convert singly linked list into circular linked list in Python

By Vamsi Krishna

In this tutorial, we shall convert a singly linked list into circular linked list in Python. A Linked List is a linear data structure where the elements are linked using pointers. .... Read More

Apply Insertion Sort for Singly Linked List in Python

By Vamsi Krishna

In this tutorial, we shall apply Insertion Sort on a singly linked list in Python. For starters, a Singly Linked List is a data structure in which the elements are “linked.... Read More

Python Program to calculate area of Enneagon

By Vamsi Krishna

In this tutorial, we shall write a Python program to find the area of an Enneagon. An Enneagon (also called as nonagon) is a 9-sided polygon. If all the sides of a polygon are equa.... Read More