Hafeezul Kareem has Published 328 Articles

Create a new string by alternately combining the characters of two halves of the string in reverse in C++ Program

Hafeezul Kareem

Hafeezul Kareem

Updated on 28-Jan-2021 07:02:14

148 Views

In this tutorial, we are going to write a program that creates a new string by alternately combining the characters of the two halves of the string in reverse order.Let's see the steps to solve the problem.Initialize the string.Find the length of the string.Store the first half and second half ... Read More

Create a mirror tree from the given binary tree in C++ Program

Hafeezul Kareem

Hafeezul Kareem

Updated on 28-Jan-2021 07:01:28

2K+ Views

In this tutorial, we are going to reflect the given binary tree.Let's see the steps to solve the problem.Write a struct node.Create the binary tree with dummy data.Write a recursive function to find the mirror of the given binary tree.Recursively call the function with left and right nodes.Swap the left ... Read More

Create a linked list from two linked lists by choosing max element at each position in C++ Program

Hafeezul Kareem

Hafeezul Kareem

Updated on 28-Jan-2021 06:58:49

2K+ Views

In this tutorial, we are going to write a program that creates a new linked list from the given linked lists.We have given two linked lists of the same size and we have to create a new linked list from the two linked lists with the max numbers from the ... Read More

Double Tree with examples in C++ Program

Hafeezul Kareem

Hafeezul Kareem

Updated on 28-Jan-2021 06:56:58

262 Views

In this tutorial, we are going to learn how to double the given tree.Let's see the steps to solve the problem.Create node class.Initialize the tree with dummy data.Write a recursive function to double the tree.Recursively traverse through the tree.Store the left node in a variable.After traversing add the data by ... Read More

Double the first element and move zero to end in C++ Program

Hafeezul Kareem

Hafeezul Kareem

Updated on 28-Jan-2021 06:56:02

132 Views

In this tutorial, we are going to write a program that doubles the first element and moves all the zeroes to the end of the given array.We have to double a number when there are tow the same elements in adjacent indices. After that, we have to add a zero ... Read More

Double ended priority queue in C++ Program

Hafeezul Kareem

Hafeezul Kareem

Updated on 28-Jan-2021 06:53:07

673 Views

In this tutorial, we are going to create a double-ended priority queue using the set in c++.Let's see the steps to create a double-ended queue.Create a struct with a name as you wish.Create a variable for the queue using the set.size method that returns the size of the queue.is_empty method ... Read More

Double Base Palindrome in C++ Program

Hafeezul Kareem

Hafeezul Kareem

Updated on 28-Jan-2021 06:51:40

339 Views

In this tutorial, we are going to write a program that checks whether the given number is a palindrome in two number systems.We have given a number and a base for another number system. We have to check whether the given number is a palindrome in the decimal number system ... Read More

Divisors of n-square that are not divisors of n in C++ Program

Hafeezul Kareem

Hafeezul Kareem

Updated on 28-Jan-2021 06:49:54

119 Views

In this tutorial, we are going to write a program that finds the divisors count of n-square and not n.It's a straightforward problem. Let's see the steps to solve the problem.Initialize the number n.Initialize a counter for divisors.Iterate from 2 to n^2n2.If the n^2n2 is divisible by the current number ... Read More

Division without using ‘/’ operator in C++ Program

Hafeezul Kareem

Hafeezul Kareem

Updated on 28-Jan-2021 06:47:18

2K+ Views

In this tutorial, we are going to learn how to divide a number without using the division (/) operator.We have given two numbers, the program should return the quotient of the division operation.We are going to use the subtraction (-) operator for the division.Let's see the steps to solve the ... Read More

Divisible by 37 for large numbers in C++ Program

Hafeezul Kareem

Hafeezul Kareem

Updated on 28-Jan-2021 06:45:55

237 Views

In this tutorial, we are going to write a program that checks whether the given large number is divisible by 37 or not.We are going to use a little bit of math here. Let's see the steps to solve the problem.Initialize the number.If the length of the given number is ... Read More

Advertisements