Largest Divisible Subset | LIS Variant | DP Concepts & Qns-18 | Leetcode-368
Whatsapp Community Link : https://whatsapp.com/channel/0029Va6kVSjICVfiVdsHgi1A
This is the 18th Video of our Playlist "DP Concepts & Qns".
In this video we will try to solve a very good DP problem - Largest Divisible Subset | Leetcode 368
LIS video - https://youtu.be/h9rm4N8XbL0
I will explain the intuition so easily that you will never forget and start seeing this as cakewalk EASYYY.
We will do live coding after explanation and see if we are able to pass all the test cases.
Also, please note that my Github solution link below contains both C++ as well as JAVA code.
Problem Name : Largest Divisible Subset | Leetcode 368
Company Tags : Google
My solutions on Github(C++ & JAVA) : https://github.com/MAZHARMIK/Interview_DS_Algo/blob/master/DP/LIS%20%26%20Variants/Largest%20Divisible%20Subset.cpp
Leetcode Link : https://leetcode.com/problems/largest-divisible-subset/
My Recursion Concepts Playlist : https://www.youtube.com/watch?v=pfb1Zduesi8&list=PLpIkg8OmuX-IBcXsfITH5ql0Lqci1MYPM
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
Approach Summary : Using the same concept of LIS. Just sort the array so that we are ensured to tak elements in increasing order. We will be solving it using simple recursion just like LIS and simple bottom up just like LIS. Only difference will be to keep track of the LIS elements to return the result.
╔═╦╗╔╦╗╔═╦═╦╦╦╦╗╔═╗
║╚╣║║║╚╣╚╣╔╣╔╣║╚╣═╣
╠╗║╚╝║║╠╗║╚╣║║║║║═╣
╚═╩══╩═╩═╩═╩╝╚╩═╩═╝
✨ Timelines✨
00:00 - Introduction
1:34 - Problem Explanation
3:56 - Intuition Building and Why Sorting ?
12:24 - Tree Diagram of Recursion
16:10 - Coding Recursion
21:52 - How it's similar to LIS
24:01 - Understand Bottom Up
33:31 - Dry Run
41:02 - Coding Bottom Up
#coding #helpajobseeker #easyrecipes #leetcode #leetcodequestionandanswers #leetcodesolution #leetcodedailychallenge #leetcodequestions #leetcodechallenge #hindi #india #coding #helpajobseeker #easyrecipes #leetcode #leetcodequestionandanswers #leetcodesolution #leetcodedailychallenge#leetcodequestions #leetcodechallenge #hindi #india #hindiexplanation #hindiexplained #easyexplaination #interview#interviewtips #interviewpreparation #interview_ds_algo #hinglish #github #design #data #google #video #instagram #facebook #leetcode #computerscience #leetcodesolutions #leetcodequestionandanswers #code #learning #dsalgo #dsa #2024 #newyear