Find All Possible Recipes from Given Supplies | Brute Force | Optimal | Leetcode 2115
Whatsapp Community Link : https://www.whatsapp.com/channel/0029Va6kVSjICVfiVdsHgi1A
Kahn's Algorithm - • Graph Concepts & Qns - 8 | Kahn's Alg...
Graph Concepts - • Graph Concepts & Qns - 1 : Graph will...
Hi Everyone, this is the 70th video of our Playlist "Graphs : Popular Interview Problems".
Now we will be solving simple problem for practicing - Find All Possible Recipes from Given Supplies | Brute Force | Optimal | Leetcode 2115 | codestorywithMIK
We will focus on why this is a Graph based problem and why Topological Sort is the ideal approach for this problem.
Problem Name : Find All Possible Recipes from Given Supplies | Brute Force | Optimal | Leetcode 2115 | codestorywithMIK
Company Tags : will update later
My solutions on Github(C++ & JAVA) - https://github.com/MAZHARMIK/Interview_DS_Algo/blob/master/Graph/Topological Sorting/Find All Possible Recipes from Given Supplies.cpp
Leetcode Link : https://leetcode.com/problems/find-all-possible-recipes-from-given-supplies
My DP Concepts Playlist : • Roadmap for DP | How to Start DP ? | ...
My Graph Concepts Playlist : • Graph Concepts & Qns - 1 : Graph will...
My Segment Tree Concepts Playlist : • Segment Tree | Introduction | Basics ...
My Recursion Concepts Playlist : • Introduction | Recursion Concepts And...
Trie Playlist - • Word Search II (Google, Amazon, Meta,...
Difference Array Technique: Concepts & Qns : • Introduction | What | How | Differenc...
My GitHub Repo for interview preparation : https://github.com/MAZHARMIK/Interview_DS_Algo
Instagram : https://www.instagram.com/codestorywithmik/
Facebook : https://www.facebook.com/people/codestorywithmik/100090524295846/
Twitter : https://twitter.com/CSwithMIK
Subscribe to my channel : / @codestorywithmik
╔═╦╗╔╦╗╔═╦═╦╦╦╦╗╔═╗
║╚╣║║║╚╣╚╣╔╣╔╣║╚╣═╣
╠╗║╚╝║║╠╗║╚╣║║║║║═╣
╚═╩══╩═╩═╩═╩╝╚╩═╩═╝
Video Summary :
Approach 1 (Brute Force):
Iterates over the recipes multiple times, checking if all ingredients are available in the supply set. If a recipe can be made, it is added to the supply and result list. Repeats until no more recipes can be formed.
Approach 2 (Topological Sorting):
Uses a graph-based approach where ingredients act as dependencies. Builds an adjacency list and calculates in-degrees for recipes. Processes recipes in a queue if their dependencies are met, ensuring an efficient ordering.
✨ Timelines✨
00:00 - Introduction
0:20 - Motivation
0:36 - Problem Explanation
3:27 - Brute Force
16:00 - Coding Brute Force
20:18 - Why is it a Graph Based Problem ?
23:28 - Topological Sorting
32:49 - Coding Optimal Approach
#MIK #mik #Mik
#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 #coding #programming #100daysofcode #developers #techjobs #datastructures #algorithms #webdevelopment #softwareengineering #computerscience #pythoncoding #codinglife #coderlife #javascript #datascience #leetcode #leetcodesolutions #leetcodedailychallenge #codinginterview #interviewprep #technicalinterview #interviewtips #interviewquestions #codingchallenges #interviewready #dsa #hindi #india #hindicoding #hindiprogramming #hindiexplanation #hindidevelopers #hinditech #hindilearning #helpajobseeker #jobseekers #jobsearchtips #careergoals #careerdevelopment #jobhunt #jobinterview #github #designthinking #learningtogether #growthmindset #digitalcontent #techcontent #socialmediagrowth #contentcreation #instagramreels #videomarketing #codestorywithmik #codestorywithmick #codestorywithmikc #codestorywitmik #codestorywthmik #codstorywithmik #codestorywihmik #codestorywithmiik #codeistorywithmik #codestorywithmk #codestorywitmick #codestorymik #codestorwithmik