Sudhir sharma has Published 1149 Articles

Flatten a multilevel linked list in C++

sudhir sharma

sudhir sharma

Updated on 31-Jan-2022 12:54:39

543 Views

In this problem, we are given a multilevel linked list. Our task is to create a program to flatten a multilevel linked list.The flattening operation is done in such a way that the first level nodes will occur first in the linked list and then the second level nodes will ... Read More

Fizz Buzz Implementation in C++

sudhir sharma

sudhir sharma

Updated on 31-Jan-2022 12:31:34

5K+ Views

In this problem, we will see the implementation and types of Fizz-Bizz problem.Fizz Buzz − it is a simple programming problem in which the programmer changes the occurrence o all multiples of 3 by ‘Fizz’ and all multiples of 5 by ‘Buzz’ in the numbers from 1 to 100.Let’s take ... Read More

Fitting Shelves Problem in C++

sudhir sharma

sudhir sharma

Updated on 31-Jan-2022 12:22:51

353 Views

In this problem, we are given three integer values W, n, m denoting the length of wall W, size of shelves n, and m. Our task is To Create a Program to solve the Fitting Shelves Problem.We need to find a way to fit shelves in such a way that ... Read More

Find the largest twins in given range in C++

sudhir sharma

sudhir sharma

Updated on 28-Jan-2022 11:43:13

203 Views

In this problem, we are given two values lValue and hValue. Our task is to find the largest twins in given range.Two numbers are said to be twin numbers if both of them are prime numbers and the difference between them is 2.Let's take an example to understand the problem, ... Read More

Find the largest pair sum in an unsorted array in C++

sudhir sharma

sudhir sharma

Updated on 28-Jan-2022 11:32:16

982 Views

In this problem, we are given an arr[] consisting of N unsorted elements. Our task is to find the largest pair sum in an unsorted array.We will find a pair whose sum is the maximum.Let's take an example to understand the problem, Input : arr[] = {7, 3, 9, 12, ... Read More

Find the largest number with n set and m unset bits in C++

sudhir sharma

sudhir sharma

Updated on 28-Jan-2022 11:28:26

175 Views

In this problem, we are given two integer values, n and m. Our task is to find the largest number with n set and m unset bits in the binary representation of the number.Let's take an example to understand the problemInput : n = 3, m = 1 Output : ... Read More

Find the Largest number with given number of digits and sum of digits in C++

sudhir sharma

sudhir sharma

Updated on 28-Jan-2022 11:21:10

2K+ Views

In this problem, we are given two integer values, N denoting the count of digits of a number and sum denoting the sum of digits of the number. Our task is to find the largest number with given number of digits and sum of digits.Let's take an example to understand ... Read More

Find the largest node in Doubly linked list in C++

sudhir sharma

sudhir sharma

Updated on 28-Jan-2022 11:13:04

340 Views

In this problem, we are given a doubly linked list LL. Our task is to find the largest node in Doubly Linked List.Let's take an example to understand the problem, Input : linked-list = 5 -> 2 -> 9 -> 8 -> 1 -> 3 Output : 9Solution ApproachA simple ... Read More

Find the largest multiple of 2, 3 and 5 in C++

sudhir sharma

sudhir sharma

Updated on 28-Jan-2022 11:06:27

196 Views

In this problem, we are given an array arr[] of size N consisting of single digits only. Our task is to find the largest multiple of 2, 3 and 5.Let's take an example to understand the problem, Input : arr[] = {1, 0, 5, 2} Output : 510Explanation −The number ... Read More

Find the largest good number in the divisors of given number N in C++

sudhir sharma

sudhir sharma

Updated on 28-Jan-2022 10:58:00

299 Views

In this problem, we are given a number N. Our task is to find the largest good number in the divisors of given number N.A good number is a number in which every digit is larger than the sum of digits of its right (all less significant bits than it). ... Read More

Advertisements