Hafeezul Kareem has Published 344 Articles

Fixed (or static) Partitioning in Operating System in C++

Hafeezul Kareem

Hafeezul Kareem

Updated on 29-Dec-2020 11:15:51

897 Views

In this tutorial, we are going to learn about the fixed partitioning in the operating system.Fixed partitioning is one to manage the memory in operating system. It's an old technique. It divides the memory into equal blocks. The size of each block is predefined and can not be changed.The memory ... Read More

First uppercase letter in a string (Iterative and Recursive) in C++

Hafeezul Kareem

Hafeezul Kareem

Updated on 29-Dec-2020 11:14:30

477 Views

In this tutorial, we are going to learn how find the first uppercase letter in the given string. Let's see an example.Input −TutorialspointOutput −TLet's see the steps to solve the problem using iterative method.Initialize the string.Iterate over the string.Check whether the current character is uppercase or not using isupper method.If ... Read More

First triangular number whose number of divisors exceeds N in C++

Hafeezul Kareem

Hafeezul Kareem

Updated on 29-Dec-2020 11:11:43

94 Views

In this tutorial, we are going to find a triangular number whose number of divisors are greater than n.If the sum of natural numbers at any point less than or equal to n is equal to the given number, then the given number is a triangular number.We have seen what ... Read More

First non-repeating character using one traversal of string in C++

Hafeezul Kareem

Hafeezul Kareem

Updated on 29-Dec-2020 11:09:45

1K+ Views

In this tutorial, we are going to learn how to find the first non-repeating character in the given string. Let's see an example.Input −tutorialspointOutput −uLet's see the steps to solve the problem.Initialize the string.Initialize a map char and array to store the frequency of the characters in the string.Iterate over ... Read More

First N natural can be divided into two sets with given difference and co-prime sums in C++

Hafeezul Kareem

Hafeezul Kareem

Updated on 29-Dec-2020 11:07:42

52 Views

In this tutorial, we have to find whether the natural numbers from 1 to n is divided into two halves or not. It has to satisfy the following conditions.The absolute difference between the two series sum should be m.And the GCD of two sums should be 1 i.e.., co-primes.The sum ... Read More

First digit in product of an array of numbers in C++

Hafeezul Kareem

Hafeezul Kareem

Updated on 29-Dec-2020 11:06:13

111 Views

In this tutorial, we are going to learn how to find first digit of the product of an array.Let's see the steps to solve the problem.Initialize the array.Find the product of the elements in the array.Divide the result until it's less than 10.Print the single-digitExampleLet's see the code. Live Demo#include ... Read More

First digit in factorial of a number in C++

Hafeezul Kareem

Hafeezul Kareem

Updated on 29-Dec-2020 11:04:26

96 Views

In this tutorial, we are going to write a program the finds the first digit of a factorial. Let's see an example.Input − 7Output − 5Let's see the steps to solve the problem.Initialize the numberFind the factorial of the number.Divide the number until it becomes a single digit.ExampleLet's see the ... Read More

Finding the vertex, focus and directrix of a parabola in C++

Hafeezul Kareem

Hafeezul Kareem

Updated on 29-Dec-2020 11:02:50

126 Views

In this tutorial, we are going to learn how to find the vertex, focus, and directrix of a parabola. We are given constants of the parabola equation x, y, and z.There are straightforward formulas to find the vertex, focus, and directrix. Let's them.Vertex − (-y/2x, 4xz-y^2/4x)Focus − (-y/2x, 4xz-y^2+1/4x)Directrix − ... Read More

Finding the Parity of a number Efficiently in C++

Hafeezul Kareem

Hafeezul Kareem

Updated on 29-Dec-2020 11:01:23

2K+ Views

In this tutorial, we are going to write a program that finds the parity of a number.We can find the parity of a number efficiently by performing the following operations using xor and right-shift operators.int b; b = n ^ (n >> 1); b = b ^ (b >> 2); ... Read More

Finding sum of digits of a number until sum becomes single digit in C++

Hafeezul Kareem

Hafeezul Kareem

Updated on 29-Dec-2020 10:59:58

7K+ Views

In this tutorial, we are going to write a program that sums digits of the given number until it becomes a single digit. Let's see an example.Input −4543Output −7Let's see the steps to solve the problem.Initialize a number.Initialize the sum to 0.Iterate until the sum is less than 9.Add each digit of ... Read More

Advertisements