Search results for #DynamicProgramming
🧩 LeetCode 1547: Minimum Cost to Cut a Stick 🔑 Idea → Interval #DP + Divide & Conquer ⚡ Approach → Recursive splits + memoization 💡 Learning → DP on partitions = optimal cuts + state reuse 🚀 #LeetCode #DynamicProgramming #Algorithms #DSA #ProblemSolving #100DaysOfCode
Solved today’s House Robber DP problems! 1️⃣ Classic: Max money without robbing adjacent houses. 2️⃣ Twist: First & last houses are neighbors—rob both and cops alert 🚨. Split + DP did the trick! #DSA #DynamicProgramming #100DaysOfCode
📅 Day 199/365 #365DaysOfCode ✅ 💹 Best Time to Buy & Sell Stock III 👉 At most 2 transactions 💰 ⚡ Approach: 🔹 DP + Recursion + Memoization 📚 ⏱️ T.C: O(n · k · 2) 💾 S.C: O(n · k · 2) #LeetCode #striver #DynamicProgramming #Algorithms #ProblemSolving #InterviewPrep
🚀Day 27 of DSA Journey: Solved DP Question #DSA #CodingJourney #DynamicProgramming #100DaysOfCode Frog Jump
Without memoization, DP is just: ‘Those who forget the past are condemned to Stack Overflow.’ 😂 #DevLife #DynamicProgramming
Day 14: Solved a stack problem & a DP problem! 🚀 Staying consistent and building momentum again. #DSA #Stack #DynamicProgramming #Day14
❓ Problem 2: Maximum Subarray 📘 Learned: Keep running sum max. If sum ever drops below 0, reset to 0. Track max so far (ans). Handles negatives by initializing ans = -Infinity. ✅ Solved on: LeetCode #53 – Maximum Subarray #DSA #Kadane #DynamicProgramming #LeetCode53
I like to think of tabulation as a series, a progression to solve a problem. It sure does require less space than recursion and memorization. Framing a problem, Conceptualizing it, Modelling it by using an apt Data Structure is crucial to solving problems. #DynamicProgramming
🐸 Hard DP problem: 403. -> Frog Jump Key insight: the state needs two dimensions the current stone index and the last jump size. Using a Boolean[][] cache lets us avoid recalculating states and optimize our DP solution. #LeetCode #100DaysOfCode #DynamicProgramming
Leetcode 300. Longest Increasing Subsequence 1️⃣ Naive recursion: take/skip - exponential 2️⃣ Add "last chosen index" - valid subsequences 3️⃣ Memoize (ind,last+1) Brute -> State -> DP #LearnInPublic #100DaysOfCode #DynamicProgramming #LeetCode
تو ویدئوی این هفتهی #انسان_بمانیم، سوال هاردست لیتکد رو با هم میخونیم وحل میکنیم. برای فان بیشتر بخش پیادهسازی رو با زبون Go انجام دادم. #برنامه_نویسی #الگوریتم #LeetCode #ACM #DynamicProgramming youtu.be/TpCW20FTm6c?si…
💻 DSA Day 55 Today I learned Best Time to Buy & Sell Stock (DP on Stocks). Used Dynamic Programming (space optimized). Time Complexity: O(n) Space Complexity: O(1) 👉 Key Idea: Keep track of the minimum price & maximize profit. #100DaysOfCode #DSA #DynamicProgramming
Leetcode 714. Best Time to Buy and Sell Stock with Transaction Fee 1️⃣ Define states - day ind+buy/sell 2️⃣ On buy - choose skip vs buy 3️⃣ On sell - choose skip vs sell (pay fee here) 4️⃣ Optimize space - only keep after + curr arrays #DynamicProgramming #LeetCode #LearnInPublic
Leetcode 309. Best Time to Buy and Sell Stock with Cooldown 1️⃣ Define states day index + buy/sell 2️⃣Buy -either skip or buy Sell -either skip or sell->cooldown 3️⃣ Build table bottom-up to handle future case #DynamicProgramming #100DaysOfCode #LearnInPublic #CodingJourney
📈 Week 7: Graphs Deep Dive + DP Start 🔹 Graph Practice (BFS/DFS, Dijkstra) 🔹 DP (P-1 to P-5) #DynamicProgramming #Algorithms #100DaysOfCode
Solved LeetCode 118: Pascal’s Triangle A classic problem where we generate Pascal’s Triangle up to a given number of rows using dynamic programming / iterative approach. Great way to pattern-building logic. 💡 #LeetCode #ProblemSolving #Coding #DynamicProgramming #Array
Hard Problem – LeetCode Number of Digit One 🔢 A complete explanation, starting from the brute force approach and gradually improving it until we reach the digit DP (dynamic programming on digits) solution. #LeetCode #100DaysOfCode #DSA #DynamicProgramming #ProblemSolving
Day 36/100 of my #100DaysOfCode challenge! ✅ Today, I tackled LeetCode 118: Pascal's Triangle. #LeetCode #CodingChallenge #Cpp #Algorithms #SoftwareDeveloper #DynamicProgramming
#DynamicProgramming. started today learn 3 approaches to tackle after recursion m1->top to down approach m2->tabulation OR down to UP approach m3->Space Optimisation approach(m2 ka pattern dekho kuchh milega wahi m3 hai)
