Build Array Where You Can Find The Maximum Exactly K Comparisons |DP Concepts & Qns-14|Leetcode-1420

Subscribers:
92,300
Published on ● Video Link: https://www.youtube.com/watch?v=YU9IGG5PB2Y



Duration: 32:12
4,231 views
271


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




Other Videos By codestorywithMIK


2023-10-17Validate Binary Tree Nodes | Using DSU | Intuitive | META | Leetcode - 1361
2023-10-16Validate Binary Tree Nodes | Using Binary Tree Properties | BFS | META | Leetcode - 1361
2023-10-15Pascal's Triangle II | Using Same Code of Pascal's Triangle I | AMAZON | Leetcode - 119
2023-10-14Number of Ways to Stay in the Same Place After Some Steps | Recursion | Memoization | Leetcode- 1269
2023-10-13Painting the Walls | Why Greedy Fails | Recursion | Memoization | GOOGLE | Leetcode - 2742
2023-10-12Min Cost Climbing Stairs | Bottom Up | Recursion | Memoization | GOOGLE | Leetcode - 746
2023-10-11Find in Mountain Array | Binary Search | Using Same Code | AMAZON | Leetcode - 1095
2023-10-11Number of Flowers in Full Bloom | Brute Force | Optimal Approach | Binary Search | Leetcode - 2251
2023-10-10Minimum Number of Operations to Make Array Continuous | Brute Force | Optimal | Leetcode - 2009
2023-10-08Max Dot Product of Two Subsequences | Recursion | Memoization | AMAZON | Leetcode - 1458
2023-10-07Build Array Where You Can Find The Maximum Exactly K Comparisons |DP Concepts & Qns-14|Leetcode-1420
2023-10-06Thank/Love You all 3000 ❤️🙏 #coding #motivation #thankyou #subscribe #10000 #codestorywithMIK #code
2023-10-06Integer Break | Tree Diagram | Recursion | Memoization | AMAZON | Leetcode - 343
2023-10-05Majority Element I | Majority Element II : Boyer-Moore | Made Simple | Leetcode - 229 and 169
2023-10-04Design HashMap | Brute Force | Optimal | META | GOOGLE | NETFLIX | Leetcode - 706
2023-10-03Number of Good Pairs | 3 Approaches | META | Leetcode - 1512
2023-10-02Remove Colored Pieces if Both Neighbors are the Same Color | Intuitive | GOOGLE | Leetcode - 2038
2023-10-01Reverse Words in a String III | 2 Approaches | Zappos | MentorGraphics | Leetcode - 557 | Live Code
2023-09-30Consistency is the 🔑 #hardwork #consistencyiskey #consistency #motivation #leetcode #coding
2023-09-30132 Pattern | Intuition explained | Brute Force | Better | Optimal | META | AMAZON | Leetcode - 456
2023-09-28Monotonic Array | Simple | Clean | META | Leetcode - 896 | Live Coding | Explanation