Sudhir sharma has Published 1206 Articles

Maximum product subset of an array in C++ program

sudhir sharma

sudhir sharma

Updated on 09-Dec-2020 12:15:45

163 Views

In the problem, we are given an array arr[] of n integer values. Our task is to create a program to find the Maximum product subset of an array.Problem Description − Here, we need to calculate the maximum possible product of a subset of elements of an array.Subset − An ... Read More

Maximum product of indexes of next greater on left and right in C++ Program

sudhir sharma

sudhir sharma

Updated on 09-Dec-2020 12:13:07

277 Views

In this problem, we are given an array arr[]. Our task is to create a program to calculate the Maximum product of indexes of next greater on left and right.Problem Description −For the given array we need to find the product of maximum value of left[i]*right[i]. Both arrays are defined ... Read More

Maximum product of an increasing subsequence in C++ Program

sudhir sharma

sudhir sharma

Updated on 09-Dec-2020 12:10:11

124 Views

In this problem, we are given an array arr[] of size n. Our task is to find the maximum product of an increasing subsequence.Problem Description − We need to find the maximum product of increasing subsequence of any size possible from the elements of the array.Let’s take an example to ... Read More

Maximum product of an increasing subsequence of size 3 in C++ program

sudhir sharma

sudhir sharma

Updated on 09-Dec-2020 12:07:55

101 Views

In this problem, we are given an array arr[] of n positive integers. Our task is to create a program to find the Maximum product of an increasing subsequence of size 3.Problem Description − Here, we need to find the maximum product of 3 elements of the array such that ... Read More

Maximum product of a triplet (subsequence of size 3) in array in C++ Program.

sudhir sharma

sudhir sharma

Updated on 09-Dec-2020 12:04:27

398 Views

In this problem, we are given an array arr[] consisting of n integers. Our task is to find the maximum product of a triplet (subsequence of size 3) in array. Here, we will be finding the triple with maximum product value and then return the product.Let’s take an example to ... Read More

Sum of two numbers where one number is represented as array of digits in C++

sudhir sharma

sudhir sharma

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

82 Views

In this problem, we are given two numbers, from which one is represented using array of digits. Our task is to create a program that will find the sum of two numbers where one number is represented as array of digits.Let’s take an example to understand the problem, Input: n ... Read More

Sum of two large numbers in C++

sudhir sharma

sudhir sharma

Updated on 17-Aug-2020 10:40:28

4K+ Views

In this problem, we are given two string that defines two large numbers. Our task is to create a program to find the sum of two large numbers.Let’s take an example to understand the problem, Input: number1 = “341299123919” number2 = “52413424” Output: 341351537343To solve this problem, we will traverse ... Read More

Sum of the series Kn + ( K(n-1) * (K-1)1 ) + ( K(n-2) * (K-1)2 ) + ... (K-1)n in C++

sudhir sharma

sudhir sharma

Updated on 17-Aug-2020 10:22:15

228 Views

In the problem, we are ginen two number k and n of the series K^n + ( K^(n-1) * (K-1)^1 ) + ( K^(n-2) * (K-1)^2 ) + ... (K-1)^n. Our task is to create a program to find the sum of the series.Let’s take an example to understand the ... Read More

Sum of XOR of all subarrays in C++

sudhir sharma

sudhir sharma

Updated on 17-Aug-2020 10:14:33

540 Views

In this problem, we are given an array arr[] of n numbers. Our task is to create a program to find the sum of XOR of all subarrays of the array.Here, we need to find all sub-arrays of the given array, and then for each subarray, we will find the ... Read More

Sum of XOR of all possible subsets in C++

sudhir sharma

sudhir sharma

Updated on 17-Aug-2020 10:00:52

336 Views

In this problem, we are given an array aar[] of n numbers. Our task is to create a program to find the Sum of XOR of all possible subsets.Here, we will find all subsets of the array. Then for each subset, we will find the XOR of elements of the ... Read More

Advertisements