Perfect Squares | Bottom UP | Made Easy | Google | Leetcode 279

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



Duration: 11:02
2,826 views
119


Whatsapp Community Link : https://www.whatsapp.com/channel/0029Va6kVSjICVfiVdsHgi1A
This is the 86th Video of our Playlist "Dynamic Programming : Popular Interview Problems".
In this video we will try to solve a very good DP problem - Perfect Squares | Leetcode 279
We will solve it using Bottom Up because we have already solved this using Recursion + Memo in another video (Link below) :
https://www.youtube.com/watch?v=Zbn8in7hpXY

We will be using the same Recursion + Memo code to convert it to Bottom Up.

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 : Perfect Squares | Leetcode 279
Company Tags : Google, Salesforce, Microsoft, Meta, Amazon
My solutions on Github(C++ & JAVA) : https://github.com/MAZHARMIK/Interview_DS_Algo/blob/master/DP/Perfect%20Squares.cpp
Leetcode Link : https://leetcode.com/problems/perfect-squares/description/


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 : The approach utilizes dynamic programming and an array t to store the minimum number of perfect squares required for each number from 0 to n. The algorithm iterates through each number, decomposing it into the sum of a perfect square and a remaining number. It calculates the minimum number of perfect squares needed for the current number based on the subproblem solutions. The final result is the minimum number of perfect squares required to sum up to the input n.


╔═╦╗╔╦╗╔═╦═╦╦╦╦╗╔═╗
║╚╣║║║╚╣╚╣╔╣╔╣║╚╣═╣
╠╗║╚╝║║╠╗║╚╣║║║║║═╣
╚═╩══╩═╩═╩═╩╝╚╩═╩═╝

✨ Timelines✨
00:00 - Introduction

#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




Other Videos By codestorywithMIK


2024-02-14Find Polygon With the Largest Perimeter | Thought Process | Greedy | Leetcode 2971
2024-02-14Subsets | Simple Story To Code | Leetcode 78 | Recursion Concepts And Questions | Video 10
2024-02-13Rearrange Array Elements by Sign | 2 Approaches | Why Order Preserve | Leetcode 2149
2024-02-13Quick Sort | Simple Story | Story To Code | Recursion Concepts And Questions | Video 9
2024-02-12Find First Palindromic String in the Array | Multiple Ways | Leetcode 2108
2024-02-11Cherry Pickup II | 3 Approaches | Super Detailed | Leetcode 1463
2024-02-10Tumlog saath ho. Bas kaafi hai ❤️ 18K family #codestorywithmik
2024-02-09Palindromic Substrings | Blueprint | Palindrome Problems | 4 Approaches | Leetcode 647
2024-02-08Largest Divisible Subset | LIS Variant | DP Concepts & Qns-18 | Leetcode-368
2024-02-08Merge Sort | Simple Story | Story To Code | Recursion Concepts And Questions | Video 8
2024-02-07Perfect Squares | Bottom UP | Made Easy | Google | Leetcode 279
2024-02-07Minimum Time to Revert Word to Initial State | Part I | Part II | KMP | Leetcode 3029 | 3031
2024-02-06Tower Of Hanoi | Simple Story | Story To Code | Recursion Concepts And Questions | Video 7
2024-02-06Count the nodes at distance K from leaf | 2 Approaches | Simple Dry Run | GFG POTD
2024-02-05Tail Recursion | Tail call Optimisation | Examples | Recursion Concepts And Questions | Video 5
2024-02-05Time Complexity | Space Complexity | Examples | Recursion Concepts And Questions | Video 4
2024-02-05Recursion Tree | Call Stack | Recursion Concepts And Questions | Video 3
2024-02-05Recursion Leap Of Faith | Examples | Recursion Concepts And Questions | Video 2
2024-02-05Introduction | Recursion Concepts And Questions | Video 1
2024-02-04First Unique Character in a String | Easy | Leetcode 387
2024-02-03Every trip teaches me something. #codestorywithmik