Ayush Gupta has Published 541 Articles

Maximum sum increasing subsequence from a prefix and a given element after prefix is must in C++

Ayush Gupta

Ayush Gupta

Updated on 15-Oct-2020 12:26:32

95 Views

In this problem, we are given an array arr[] of N integers and two index values x and y. Our task is to create a program to find the Maximum sum increasing subsequence from a prefix and a given element after prefix is must in C++.Problem DescriptionWe will find the ... Read More

Maximum Sum Increasing Subsequence using Binary Indexed Tree in C++

Ayush Gupta

Ayush Gupta

Updated on 15-Oct-2020 12:21:46

80 Views

In this problem, we are given an array arr[] of N elements. Our task is to create a program to find the maximum Sum Increasing Subsequence using Binary Indexed Tree in C++.Let’s take an example to understand the problem, Inputarr[] = {4, 1, 9, 2, 3, 7}Output13ExplanationMaximum increasing subsequence is ... Read More

Maximum sum of absolute difference of any permutation in C++

Ayush Gupta

Ayush Gupta

Updated on 15-Oct-2020 12:19:26

317 Views

In this problem, we are given an array. Our task is to create a program to find the Maximum sum of absolute difference of any permutation in C++.Problem DescriptionWe will be finding all permutation of the elements of the given array. And then finding the sum of the absolute difference ... Read More

Maximum sum of difference of adjacent elements in C++

Ayush Gupta

Ayush Gupta

Updated on 15-Oct-2020 12:17:54

181 Views

In this problem, we are given a number N. Our task is to create a program to find the Maximum sum of difference of adjacent elements in C++.Problem DescriptionWe will find the Maximum sum of the absolute difference between the adjacent elements of all permutation arrays.Let’s take an example to ... Read More

Maximum sum of distinct numbers such that LCM of these numbers is N in C++

Ayush Gupta

Ayush Gupta

Updated on 15-Oct-2020 12:16:27

112 Views

In this problem, we are a number N. Our task is to create a program to find the Maximum sum of distinct numbers such that LCM of these numbers is N in C++.Problem DescriptionWe need to find the sum of all factors of the number N. And add all distinct ... Read More

Maximum sum of elements from each row in the matrix in C++

Ayush Gupta

Ayush Gupta

Updated on 15-Oct-2020 12:11:37

756 Views

In this problem, we are given a two matrix mat[][]. Our task is to create a program to find the maximum sum of elements from each row in the matrix in C++.Problem DescriptionHere, we will find the maximum sum by taking one element from each row of the matrix in ... Read More

Maximum sum such that no two elements are adjacent in C++

Ayush Gupta

Ayush Gupta

Updated on 15-Oct-2020 12:07:39

179 Views

In this problem, we are given an array arr[]. Our task is to create a program to find the Maximum sum such that no two elements are adjacent in C++.Problem DescriptionWe need to find the maximum sum of the sequence from the array such that no 2 numbers from the ... Read More

Maximum sum such that no two elements are adjacent - Set 2 in C++

Ayush Gupta

Ayush Gupta

Updated on 15-Oct-2020 12:05:22

155 Views

In this problem, we are given an array arr[]. Our task is to create a program to find the Maximum sum such that no two elements are adjacent in C++.Problem DescriptionWe need to find the maximum sum of the sequence from the array such that no 2 numbers from the ... Read More

Maximum trace possible for any sub-matrix of the given matrix in C++

Ayush Gupta

Ayush Gupta

Updated on 15-Oct-2020 12:00:47

237 Views

In this problem, we are given a two-dimensional array arr[][]. Our task is to create a program to find the Maximum trace possible for any sub-matrix of the given matrix in C++.Problem Descriptionwe need to find the maximum trace for any sub-matrix. The trace is the sum of elements of ... Read More

Maximum trains for which stoppage can be provided in C++

Ayush Gupta

Ayush Gupta

Updated on 15-Oct-2020 11:56:44

195 Views

In this problem, we are given a number N denoting the number of platforms a station has with two tracks each. And T trains will be passing the station whose arrival and departure time are given. Each train stops at a specific station. Our task is to create a program ... Read More

Advertisements