Рет қаралды 3,629
Whatsapp Community Link : www.whatsapp.c...
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) :
• Perfect Squares | Why ...
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) : github.com/MAZ...
Leetcode Link : leetcode.com/p...
My Recursion Concepts Playlist : • Introduction | Recursi...
My DP Concepts Playlist : • Roadmap for DP | How t...
My Graph Concepts Playlist : • Graph Concepts & Qns -...
My GitHub Repo for interview preparation : github.com/MAZ...
Subscribe to my channel : / @codestorywithmik
Instagram : / codestorywithmik
Facebook : / 100090524295846
Twitter : / 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