Sudhir sharma has Published 1206 Articles

Maximum sum alternating subsequence in C++ program

sudhir sharma

sudhir sharma

Updated on 09-Dec-2020 13:05:53

344 Views

In this problem, we are given an array arr[] of n integers. Our task is to create a program to find the Maximum sum alternating subsequence starting from the first element of the array.An alternating subsequence is a subsequence in which elements are increasing and decreasing in an alternating order ... Read More

Maximum subsequence sum such that no three are consecutive in C++ Program

sudhir sharma

sudhir sharma

Updated on 09-Dec-2020 13:00:51

97 Views

In this problem, we are given an array arr[] consisting of n positive integers. Our task is to create a program to find the maximum subsequence sum such that no three are consecutive.Problem Description − Here, we need to find the sum of sequences created from the array such that ... Read More

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

sudhir sharma

sudhir sharma

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

127 Views

In this problem, we are given an array arr[] of size n and an integer k. Our task is to create a program to find the maximum subarray sum in an array created after repeated concatenation.Problem Description − We will find the maximum sum of the subarray is taken from ... Read More

Maximum Subarray Sum Excluding Certain Elements in C++ program

sudhir sharma

sudhir sharma

Updated on 09-Dec-2020 12:51:34

94 Views

In this problem, we are given two arrays arr1[] of size n and arr2[] of size m. Our task is to create a program to find the maximum subarray sum excluding certain elements.Problem Description − We need to find the maximum subarray sum from elements of the array arr1[] that ... Read More

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

sudhir sharma

sudhir sharma

Updated on 09-Dec-2020 12:49:26

165 Views

In this problem, we are given an array arr[] consisting of n positive integers and an integer k. Our task is to create a program to find the Maximum subarray size, such that all subarrays of that size have sum less than k.Problem Description − we need to find the ... Read More

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

sudhir sharma

sudhir sharma

Updated on 09-Dec-2020 12:46:25

87 Views

In this problem, we are given a binary tree BT. Our task is to create a program to find the Maximum sub−tree sum in a Binary Tree such that the sub−tree is also a BST.Binary Tree has a special condition that each node can have a maximum of two children.Binary ... Read More

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

sudhir sharma

sudhir sharma

Updated on 09-Dec-2020 12:41:28

69 Views

In this problem, we are given a 2-D matrix of size nXn consisting of binary numbers (0/1). Our task is to create a program to find the Maximum submatrix area having count of 1’s one more than count of 0’s.Let’s take an example to understand the problem, Inputbin[N][N] = { ... Read More

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

sudhir sharma

sudhir sharma

Updated on 09-Dec-2020 12:36:44

97 Views

In this problem, we are given an array stu[] of size n denoting the marks of students in the class. For each student, the maximum mark is 100 and a student needs 50 marks to pass the exam. Our task is to create a program to find the Maximum students ... Read More

Maximum size rectangle binary sub-matrix with all 1s in C++ Program

sudhir sharma

sudhir sharma

Updated on 09-Dec-2020 12:21:35

275 Views

In this problem, we are given a 2-D matrix bin[][] of size n*m that contains online binary numbers i.e. 0/1. Our task is to create a program to find the Maximum size rectangle binary sub-matrix with all 1s and Return the maximum area.Let’s take an example to understand the problem, ... Read More

Maximum size of sub-array that satisfies the given condition in C++ program

sudhir sharma

sudhir sharma

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

108 Views

In this problem, we are given an array arr[] of n integers. Our task is to create a program to find the maximum size of sub-array that satisfies the given condition.Problem Description − We need to find the length of largest subarray that satisfies any one of the below condition, ... Read More

Advertisements