Hafeezul Kareem has Published 328 Articles

Divisibility by 64 with removal of bits allowed in C++ Program

Hafeezul Kareem

Hafeezul Kareem

Updated on 28-Jan-2021 06:44:33

192 Views

In this tutorial, we are going to write a program that checks whether the given binary number is divisible by 64 or not.We have given a binary number and we can remove the bits to make it divisible by 64. After removing the bits, if the number is divisible by ... Read More

Divisibility by 12 for a large number in C++ Program

Hafeezul Kareem

Hafeezul Kareem

Updated on 28-Jan-2021 06:42:37

171 Views

In this tutorial, we are going to write a program that checks whether the given large number in string format is divisible by 12 or not.We are going to use a little bit of math to solve this problem. If the number is divisible by 3 and 4, then the ... Read More

Divide the given linked list in two lists of size ratio p:q in C++ Program

Hafeezul Kareem

Hafeezul Kareem

Updated on 28-Jan-2021 06:41:00

151 Views

In this tutorial, we are going to write a program that divides the given linked list into a p:q ratioIt's a straightforward program. Let's see the steps to solve the problem.Create a struct for the linked list node.Initialize the linked list with dummy data.Initialize the p:q ratio.Find the length of ... Read More

Divide number into two parts divisible by given numbers in C++ Program

Hafeezul Kareem

Hafeezul Kareem

Updated on 28-Jan-2021 06:39:27

573 Views

In this tutorial, we are going to write a program that divides a number into two parts which are divisible by the given numbers.We have given a number in string format and two other integers. The program should return whether it's possible to divide the given number into two parts ... Read More

Divide large number represented as string in C++ Program

Hafeezul Kareem

Hafeezul Kareem

Updated on 27-Jan-2021 12:50:21

3K+ Views

In this tutorial, we are going to learn how to divide a large number that is represented as a string.We have given a large number in string format and a divisor. Our program should find a reminder.First, we will find a part of the given number that is greater than ... Read More

Divide every element of one array by other array elements in C++ Program

Hafeezul Kareem

Hafeezul Kareem

Updated on 27-Jan-2021 12:49:35

1K+ Views

In this tutorial, we are going to write a program that divides one array of elements by another array of elements.Here, we are following a simple method to complete the problem. Let's see the steps to solve the problem.Initialize the two arrays.Iterate through the second array and find the product ... Read More

Divide a string in N equal parts in C++ Program

Hafeezul Kareem

Hafeezul Kareem

Updated on 27-Jan-2021 12:48:23

1K+ Views

In this tutorial, we are going to write a program that divides the given string into N equal parts.If we can't divide the string into N equal parts, then print the same thing. Let's see the steps to solve the problem.Initialize the string and N.Find the length of the string ... Read More

Divide a number into two parts in C++ Program

Hafeezul Kareem

Hafeezul Kareem

Updated on 27-Jan-2021 12:46:26

734 Views

In this tutorial, we are going to write a program that divides the given number into two partsIt's a straightforward problem to solve. We can get a number by diving the given number. And we can get the second number by subtracting the result from the total.If the given number ... Read More

Divide a big number into two parts that differ by k in C++ Program

Hafeezul Kareem

Hafeezul Kareem

Updated on 27-Jan-2021 12:46:05

157 Views

In this tutorial, we are going to write a program that divides a number into two parts with a difference of k.Let's see an example.Inputn = 100 k = 30Output65 35Here, we need to understand a little bit of math before diving into the problem. Let's see it.We have a ... Read More

Distributing all balls without repetition in C++ Program

Hafeezul Kareem

Hafeezul Kareem

Updated on 27-Jan-2021 12:44:38

248 Views

In this tutorial, we are going to learn how to distribute n balls for k students without hurting anyone.The idea is simple, we have n balls in different colors that need to be distributed to the students. We don't have to give more than one ball of the same color ... Read More

Advertisements