Ayush Gupta has Published 541 Articles

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

88 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

139 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

77 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

218 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

98 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

154 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

Maximum sum of pairwise product in an array with negative allowed in C++

Ayush Gupta

Ayush Gupta

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

124 Views

In this tutorial, we will be discussing a program to find maximum sum of pairwise product in an array with negative allowed.For this we will be provided with an array containing integers. Our task is to find the maximum sum while performing pairwise multiplications.Example Live Demo#include #define Mod 1000000007 using ... Read More

Maximum sum of pairs with specific difference in C++

Ayush Gupta

Ayush Gupta

Updated on 09-Sep-2020 13:13:07

103 Views

In this tutorial, we will be discussing a program to find maximum sum of pairs with specific difference.For this we will be provided with an array containing integers and a value K. Our task is to pair elements having difference less than K and finally find the maximum sum of ... Read More

Maximum sum of nodes in Binary tree such that no two are adjacent in C++

Ayush Gupta

Ayush Gupta

Updated on 09-Sep-2020 13:10:07

151 Views

In this tutorial, we will be discussing a program to find maximum sum of nodes in Binary tree such that no two are adjacent.For this we will be provided with a binary tree. Our task is to find the subset having maximum sum such that no two nodes in subset ... Read More

Maximum sum of nodes in Binary tree such that no two are adjacent | Dynamic Programming In C++

Ayush Gupta

Ayush Gupta

Updated on 09-Sep-2020 13:08:04

67 Views

In this tutorial, we will be discussing a program to find maximum sum of nodes in Binary tree such that no two are adjacent using Dynamic Programming.For this we will be provided with a binary tree. Our task is to find the subset having maximum sum such that no two ... Read More

Advertisements