Welcome to the daily solving of our PROBLEM OF THE DAY with Devashish Khare. We will discuss the entire problem step-by-step and work towards developing an optimized solution. This will not only help you brush up on your concepts of Dynamic Programming but will also help you build up problem-solving skills.
In this problem, we are given, an array of n positive integers. Find the sum of the maximum sum subsequence of the given array such that the integers in the subsequence are sorted in strictly increasing order i.e. a strictly increasing subsequence.
Example :
Input:
N = 5, arr[] = {1, 101, 2, 3, 100}
Output:
106
Explanation:
The maximum sum of an increasing sequence is obtained from {1, 2, 3, 100},
Give the problem a try before going through the video. All the best!!!
Problem Link: https://practice.geeksforgeeks.org/problems/maximum-sum-increasing-subsequence4749/1