Ayush Gupta has Published 541 Articles

Find two distinct prime numbers with given product in C++

Ayush Gupta

Ayush Gupta

Updated on 19-Aug-2020 10:34:42

103 Views

In this tutorial, we will be discussing a program to find two distinct prime numbers with given product.For this we will be provided with an integer value. Our task is to find the two prime integer values such that their product is equal to the given value.Example Live Demo#include using ... Read More

Maximum Sum Increasing Subsequence | DP-14 in C++

Ayush Gupta

Ayush Gupta

Updated on 22-Jul-2020 08:20:57

97 Views

In this tutorial, we will be discussing a program to find maximum Sum Increasing Subsequence.For this we will be provided with an array containing N integers. Our task is to pick up elements from the array adding to the maximum sum such that the elements are in sorted orderExample Live Demo#include ... Read More

Maximum sum alternating subsequence in C++

Ayush Gupta

Ayush Gupta

Updated on 10-Jul-2020 14:20:34

92 Views

In this tutorial, we will be discussing a program to find maximum sum alternating subsequence.For this we will be provided with an array of integers. Our task is to find the maximum sum of an alternating subsequence i.e sequence which is first decreasing, then increasing, then decreasing and so on.Example Live ... Read More

Maximum sub-tree sum in a Binary Tree such that the sub-tree is also a BST in C++

Ayush Gupta

Ayush Gupta

Updated on 10-Jul-2020 14:18:26

135 Views

In this tutorial, we will be discussing a program to find maximum sub-tree sum in a Binary Tree such that the sub-tree is also a BST.For this we will be provided with a binary tree. Our task is to print the sum of a sub-tree which is also a binary ... Read More

Maximum subsequence sum such that no three are consecutive

Ayush Gupta

Ayush Gupta

Updated on 10-Jul-2020 14:15:14

236 Views

In this tutorial, we will be discussing a program to find maximum subsequence sum such that no three are consecutive.For this we will be provided with a series of positive integers. Our task is to find the maximum sum without taking in their consecutive positive integers in the sum value.Example Live ... Read More

Maximum sub-matrix area having count of 1’s one more than count of 0’s in C++

Ayush Gupta

Ayush Gupta

Updated on 10-Jul-2020 14:13:32

67 Views

In this tutorial, we will be discussing a program to find maximum sub-matrix area having count of 1’s one more than count of 0’s.For this we will be provided with a matrix containing 0’s and 1’s. Our task is to get the sub-matrix of maximum area containing more 1’s than ... Read More

Maximum subarray sum in an array created after repeated concatenation in C++

Ayush Gupta

Ayush Gupta

Updated on 10-Jul-2020 14:08:47

80 Views

In this tutorial, we will be discussing a program to find maximum subarray sum in an array created after repeated concatenation.For this we will be provided with an array and an integer K. Our task is to find the subarray with the maximum elements when the given array is repeated ... Read More

Maximum Subarray Sum Excluding Certain Elements in C++

Ayush Gupta

Ayush Gupta

Updated on 10-Jul-2020 14:07:10

86 Views

In this tutorial, we will be discussing a program to find maximum Subarray Sum Excluding Certain Elements.For this we will be provided with two arrays of size M and N. Our task is to find a sub-array in the first array such that no element inside the subarray is present ... Read More

Maximum subarray size, such that all subarrays of that size have sum less than k in C++

Ayush Gupta

Ayush Gupta

Updated on 10-Jul-2020 14:05:05

106 Views

In this tutorial, we will be discussing a program to find maximum subarray size, such that all subarrays of that size have sum less than k.For this we will be provided with an array of size N and an integer k. Our task is to find the length of subarray ... Read More

Maximum students to pass after giving bonus to everybody and not exceeding 100 marks in C++

Ayush Gupta

Ayush Gupta

Updated on 10-Jul-2020 14:01:45

96 Views

In this tutorial, we will be discussing a program to find maximum students to pass after giving bonus to everybody and not exceeding 100 marks.For this we will be provided with an array containing marks of N students. Our task is to get more student pass the exam (50 marks ... Read More

Advertisements