Posts from C++

Morris Preorder Tree Traversal of a binary tree in C++

By Pritam Hande

You are given a binary tree and you want to find the preorder traversal of the binary tree in C++. There are several ways to do so.  You can use recursion, stack. But if you want .... Read More

Find Union of Two Arrays in C++

By Pritam Hande

In this tutorial, we will learn how to find the union of two unsorted arrays in C++. Before that let’s first understand what is array. Array: is a derived data type that c.... Read More

Morris Inorder Tree Traversal in C++

By Pritam Hande

In this tutorial, we will learn Morris inorder tree traversal in C++. For learning morris inorder tree traversal first we should know about what is inorder tree traversal. Inorder .... Read More

Ternary search in C++

By Pritam Hande

In this tutorial, we will learn about the ternary search and its implementation in C++. Ternary Search: It is a divide and conquer algorithm that is used to find an element in an a.... Read More

Kruskal’s algorithm in C++

By Pritam Hande

In this tutorial, we will learn about Kruskal’s algorithm and its implementation in C++ to find the minimum spanning tree. Kruskal’s algorithm: Kruskal’s algorith.... Read More

Play Music in C++

By Pritam Hande

In this tutorial, we will learn how to play .wav audio files using the PlaySound function in C++. Steps to follow for implementation Open Dev C++ application. ( I’m using Dec.... Read More

Find difference between two dates in C++

By Pritam Hande

In this tutorial, we will learn how to find the difference between two dates in C++. Before proceeding further first, let’s go through some basic information related to the t.... Read More

Whether a number is Harshad number (niven) or not in C++

By Siddharth Chhabra

In this tutorial, we are going to learn how to check if a number is a Harshad number (Niven number ) or not in C++ with a simple and easy program. Harshad or Niven number in C++ An.... Read More