Build Array Where You Can Find The Maximum Exactly K Comparisons |DP Concepts & Qns-14|Leetcode-1420
Hi Everyone, this is the 15th video of our Concepts Playlist "DP Concepts & Qns".
Today we will solve our 1-D DP problem which is a variant of the Longest Increasing Subsequence "Build Array Where You Can Find The Maximum Exactly K Comparisons" (Leetcode-1420).
We have already studied LIS using Recursion+Memo and Bottom Up in Video-11 and 12
Please see that video as well - https://www.youtube.com/watch?v=DG50PJIx2SM&list=PLpIkg8OmuX-JhFpkhgrAwZRtukO0SkwAt&index=11
This is one of the Hard LIS variants. The only hard part of this problem is to see the LIS hidden in it.
Else the remaining part is extremely easy. Please note that the code will not be entirely the same as LIS, that's what Hard Qns are all about right :-)
If you have been following my "DP Concepts & Qns" playlist , then these will become very easy.
Make sure to watch from the beginning of this playlist to master DP in the easiest way possible.
My aim is to make DP easy and make everyone believe that once you get clarity , you can solve even DP Qns Easily.
It will no longer be a Nightmare topic for anyone. All I need is your attention for some time and CONSISTENCY.
"If someone can, we can too"
Problem Name : Build Array Where You Can Find The Maximum Exactly K Comparisons
Company Tags : Will update soon
My solutions on Github : https://github.com/MAZHARMIK/Interview_DS_Algo/blob/master/DP/LIS%20%26%20Variants/Build%20Array%20Where%20You%20Can%20Find%20The%20Maximum%20Exactly%20K%20Comparisons.cpp
Leetcode Link : https://leetcode.com/problems/build-array-where-you-can-find-the-maximum-exactly-k-comparisons/
My DP Concepts Playlist : https://youtu.be/7eLMOE1jnls
My Graph Concepts Playlist : https://youtu.be/5JGiZnr6B5w
My GitHub Repo for interview preparation : https://github.com/MAZHARMIK/Interview_DS_Algo
Subscribe to my channel : https://www.youtube.com/@codestorywithMIK
Instagram : https://www.instagram.com/codestorywithmik/
Facebook : https://www.facebook.com/people/codestorywithmik/100090524295846/
Twitter : https://twitter.com/CSwithMIK
╔═╦╗╔╦╗╔═╦═╦╦╦╦╗╔═╗
║╚╣║║║╚╣╚╣╔╣╔╣║╚╣═╣
╠╗║╚╝║║╠╗║╚╣║║║║║═╣
╚═╩══╩═╩═╩═╩╝╚╩═╩═╝
#coding #helpajobseeker #easyrecipes #leetcode #leetcodequestionandanswers #leetcodesolution #leetcodedailychallenge #leetcodequestions #leetcodechallenge #hindi #india #hindiexplanation #hindiexplained #easyexplaination #interview #interviewtips
#interviewpreparation #interview_ds_algo #hinglish