Ayush Gupta has Published 541 Articles

Program to print the first shortest root to leaf path in a Binary Tree using C++

Ayush Gupta

Ayush Gupta

Updated on 01-Nov-2019 07:01:16

178 Views

In this tutorial, we will be discussing a program to print the first shortest root to leaf path in a Binary Tree.In this, we will be given a binary tree with distinct values, and we have to find the shortest path from the root node to the leaf node in ... Read More

Program to print the longest common substring using C++

Ayush Gupta

Ayush Gupta

Updated on 01-Nov-2019 06:57:00

499 Views

In this tutorial, we will be discussing a program to print the longest common substring.For this we will be given two strings say A and B. We have to print the longest substring common to the two input strings A and B.For example, if we are given with “HelloWorld” and ... Read More

Program to print root to leaf paths without using recursion using C++

Ayush Gupta

Ayush Gupta

Updated on 01-Nov-2019 06:42:29

114 Views

In this tutorial, we will be discussing a program to print the path from the root node to all the leaf nodes in a given binary tree.For example, let us say we have the following binary treeIn this binary tree, we have 4 leaf nodes. Therefore we can have 4 ... Read More

Program to print prime numbers in a given range using C++ STL

Ayush Gupta

Ayush Gupta

Updated on 01-Nov-2019 06:36:49

197 Views

In this tutorial, we will be discussing a program to print prime numbers for a given range of numbers using the C++ Standard Template Library.In this, we will be given two numbers say a and b. The task is to print all the coming prime numbers in this range. For ... Read More

Program to print path from root to a given node in a binary tree using C++

Ayush Gupta

Ayush Gupta

Updated on 01-Nov-2019 06:33:54

184 Views

In this tutorial, we will be discussing a program to print the path from root to a given node in a binary tree.For a given binary tree having distinct nodes, we have to print the complete path to reach a particularly given node from the root node of the binary ... Read More

Program to print path from root to all nodes in a Complete Binary Tree using C++

Ayush Gupta

Ayush Gupta

Updated on 01-Nov-2019 06:31:57

140 Views

In this tutorial, we will be discussing a program to print the path from the root node of a binary tree to all the other nodes present in the given binary tree.In this program, we will be given a number N, denoting the number of elements present in the binary ... Read More

Program to print numbers such that no two consecutive numbers are co-prime and every three consecutive numbers are co-prime Using C++

Ayush Gupta

Ayush Gupta

Updated on 01-Nov-2019 06:21:09

105 Views

In this tutorial, we will be discussing a program to print numbers such that no two consecutive numbers are co-prime and every three consecutive numbers are coprime.In this, we will be given an integer N, we have to print N integers less than 109 such that no two consecutive numbers ... Read More

Program to print nodes in the Top View of Binary Tree using C++

Ayush Gupta

Ayush Gupta

Updated on 01-Nov-2019 06:15:48

139 Views

In this tutorial, we will be discussing a program to print all the nodes that appear in the top view of a given binary tree.For a particular binary tree, a node appears in its top view if it is the very first node at its horizontal distance. Horizontal distance for ... Read More

Program to print nodes between two given level numbers of a binary tree using C++

Ayush Gupta

Ayush Gupta

Updated on 01-Nov-2019 06:12:35

87 Views

In this tutorial, we will be discussing a program to print nodes between the two given level numbers of a binary tree.In this, we will be given a low level and a high level for a particular binary tree and we have to print all the elements between the given ... Read More

C++ program to find ΔX which is added to numerator and denominator both of fraction (a/b) to convert it to another fraction (c/d)

Ayush Gupta

Ayush Gupta

Updated on 03-Oct-2019 12:30:47

62 Views

In this article, we will be discussing a program to find ΔX which is added to the numerator and denominator both of given fraction (a/b) to convert it to another given irreducible fraction (c/d).For example, let us suppose we have been given with the following values, a = 4 | ... Read More

Advertisements