Ayush Gupta has Published 530 Articles

Maximum rational number (or fraction) from an array in C++

Ayush Gupta

Ayush Gupta

Updated on 15-Sep-2020 14:14:32

267 Views

In this problem, we are given a 2-D array that contains rational numbers (one in each row). Our task is to create a program to calculate the maximum rational number (or fraction) from an array in C++.Problem Description − The 2-D array is of the form [n][2]. Each row has ... Read More

Maximum score after flipping a Binary Matrix atmost K times in C++

Ayush Gupta

Ayush Gupta

Updated on 15-Sep-2020 14:12:56

314 Views

In this problem, we are given a 2-D array arr[] consisting of boolean values (i.e 0’s and 1’s) and an integer K. Our task is to create a program to find the Maximum score after flipping a Binary Matrix atmost K times in C++.Problem Description − Here, for the 2-D ... Read More

Maximum set bit sum in array without considering adjacent elements in C++

Ayush Gupta

Ayush Gupta

Updated on 15-Sep-2020 14:11:22

185 Views

In this problem, we are given an array arr[] of integers. Our task is to create a program to calculate the Maximum set bit sum in array without considering adjacent elements in C++.Problem description − Here, we have an array arr[]. We have to find the number of set bits ... Read More

Maximum sum subsequence with at-least k distant elements in C++

Ayush Gupta

Ayush Gupta

Updated on 09-Sep-2020 13:30:59

166 Views

In this tutorial, we will be discussing a program to find maximum sum subsequence with at-least k distant elements.For this we will be provided with an array containing integers and a value K. Our task is to find the subsequence having maximum sum such that all the elements are at ... Read More

Maximum sum subarray such that start and end values are same in C++

Ayush Gupta

Ayush Gupta

Updated on 09-Sep-2020 13:29:00

189 Views

In this tutorial, we will be discussing a program to find maximum sum subarray such that start and end values are same.For this we will be provided with an array containing integers. Our task is to find the subarray with the maximum sum such that the elements are both its ... Read More

Maximum sum rectangle in a 2D matrix | DP-27 in C++

Ayush Gupta

Ayush Gupta

Updated on 09-Sep-2020 13:26:57

206 Views

In this tutorial, we will be discussing a program to find maximum sum rectangle in a 2D matrix.For this we will be provided with a matrix. Our task is to find out the submatrix with the maximum sum of its elements.Example Live Demo#include using namespace std; #define ROW 4 #define COL ... Read More

Maximum sum possible for a sub-sequence such that no two elements appear at a distance < K in the array in C++

Ayush Gupta

Ayush Gupta

Updated on 09-Sep-2020 13:24:28

115 Views

In this tutorial, we will be discussing a program to find maximum sum possible for a sub-sequence such that no two elements appear at a distance < K in the array.For this we will be provided with an array containing N intergers and a value K. Our task is to ... Read More

Maximum sum path in a matrix from top to bottom in C++ Program

Ayush Gupta

Ayush Gupta

Updated on 09-Sep-2020 13:22:05

279 Views

In this tutorial, we will be discussing a program to find maximum sum path in a matrix from top to bottom.For this we will be provided with a matrix of N*N size. Our task is to find the maximum sum route from top row to bottom row while moving to ... Read More

Maximum sum of smallest and second smallest in an array in C++

Ayush Gupta

Ayush Gupta

Updated on 09-Sep-2020 13:20:03

162 Views

In this tutorial, we will be discussing a program to find maximum sum of smallest and second smallest in an array.For this we will be provided with an array containing integers. Our task is to find the maximum sum of smallest and second smallest elements in every possible iteration of ... Read More

Maximum Sum of Products of Two Arrays in C++

Ayush Gupta

Ayush Gupta

Updated on 09-Sep-2020 13:18:27

218 Views

In this tutorial, we will be discussing a program to find maximum Sum of Products of Two Arrays.For this we will be provided with two arrays of same size. Our task is to find the maximum sum by multiplying exactly one element from first element with one element from the ... Read More

Advertisements