Sunidhi Bansal has Published 1100 Articles

Maximum number of partitions that can be sorted individually to make sorted in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 29-Aug-2020 08:27:47

550 Views

We are given with an array of N numbers with elements lying in range 0 and N-1. The elements are unsorted. The goal is to find the maximum number of partitions of the array which can be sorted individually and then can be concatenated to make a whole sorted array ... Read More

Maximum number with same digit factorial product in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 17-Aug-2020 09:26:44

88 Views

Given the task is to find the maximum number without any leading or trailing zeroes or ones whose product of factorial of its digits is equal to the product of factorial of digits of the given number N.Let’s now understand what we have to do using an example −Input − ... Read More

Maximum number that can be display on Seven Segment Display using N segments in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 17-Aug-2020 09:24:08

257 Views

Given the task is to find the maximum number that can be displayed using N segment on ant number of seven segment display.Let’s now understand what we have to do using an example −Input − N=5Output − 71Explanation − The largest number will be displayed as follows on the seven ... Read More

Maximum number of Zombie processes a system can handle in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 17-Aug-2020 09:21:18

126 Views

Given the task is to find the maximum number of Zombie processes that a system can handle or in other words, the program does not stop its execution.A Zombie process (also known as defunct process) is a process that has completed its process via exit() (system call) but still has ... Read More

Maximum number of unique prime factors in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 17-Aug-2020 09:20:03

983 Views

Given the task is to find the maximum number of unique prime factors a number can have in the range of [1, N] where N is given.Let’s now understand what we have to do using an example −Input − N=100Output − 3Explanation − Let us take 30 in the range ... Read More

Maximum number of trailing zeros in the product of the subsets of size k in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 17-Aug-2020 09:18:22

157 Views

Given the task is to find the maximum number of trailing zeroes in the product of the subsets of size K, of a given array of size N.Let’s now understand what we have to do using an example −Input − Arr[] = {5, 20, 2} , K=2Output − 2Explanation − ... Read More

Maximum number of segments of lengths a, b and c in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 17-Aug-2020 09:16:11

187 Views

Given the task is to find the maximum number of line segments of lengths a, b and c that can be formed from given positive integer N.Let’s now understand what we have to do using an example −Input − N=8, a=3, b=1, c=2Output − 8Explanation − N can be divided ... Read More

Maximum number of pieces in N cuts in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 17-Aug-2020 09:14:19

536 Views

Given the task is to calculate the maximum number of square or rectangle pieces of equal size that can be obtained by cutting a given square piece in total N number of cuts horizontally or vertically.Let’s now understand what we have to do using an example −Input − N=8Output − ... Read More

Maximum number of parallelograms that can be made using the given length of line segments in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 17-Aug-2020 09:12:37

87 Views

Given the task is to find the maximum number of parallelograms that can be made using given N number of line segments if each line segment can be used at most in one parallelogram.Let’s now understand what we have to do using an example −Input − Arr[] = {8, 3, ... Read More

Maximum number of ones in a N*N matrix with given constraints in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 17-Aug-2020 09:10:45

77 Views

Given the task is to find the maximum number of ones in a binary matrix possible with the following constraints.Two integers N and X are given where X

Advertisements