SarthakKeshari / CPP-Questions-and-Solutions

This repository aims to solve and create new problems from different spheres of coding. A path to help students to get access to solutions and discuss their doubts.
MIT License
45 stars 132 forks source link

Maximum Sum Increasing Subsequence #401

Closed PrakharRathore123 closed 2 years ago

PrakharRathore123 commented 2 years ago

Enter your question -

Given an array of n positive integers. Write a program to find the sum of maximum sum subsequence of the given array such that the integers in the subsequence are sorted in increasing order.

Test cases-

Test case 1) For input {1, 101, 2, 3, 100, 4, 5}} output should be 106 because the max sum increasing sequence 1,2,3,100 Because we have find the Maximum Maximum Sum Increasing Subsequence and length of subsequence is 4, Test case 2) For input {3, 4, 5, 10} output should be 3+4+5+10=22 Max longest subsequence is 4.

Enter link to the question(if question belongs to any online platform) -

https://practice.geeksforgeeks.org/problems/maximum-sum-increasing-subsequence4749/1

Tags for the question(eg - Array, Basic, Stack, etc.) -

Recursion , Dynamic Programming , Array

PrakharRathore123 commented 2 years ago

@SarthakKeshari Kindly issue me this problem.

SarthakKeshari commented 2 years ago

@PrakharRathore123, Kindly explain how test case 1 is correct

PrakharRathore123 commented 2 years ago

@SarthakKeshari Kindly check

SarthakKeshari commented 2 years ago

@PrakharRathore123, Kindly mention the link to the online platform this question is from

PrakharRathore123 commented 2 years ago

@SarthakKeshari Kindly check

SarthakKeshari commented 2 years ago

@PrakharRathore123, Kindly mention link to the question

PrakharRathore123 commented 2 years ago

@SarthakKeshari Kindly issue me this problem.

SarthakKeshari commented 2 years ago

@PrakharRathore123, Kindly mention link(url) to the question

PrakharRathore123 commented 2 years ago

@SarthakKeshari Kindly issue me this problem.

SarthakKeshari commented 2 years ago

@PrakharRathore123, Kindly add your solution to "GeeksForGeeks" folder. Deadline - 13/10/2021