Today in Lecture 1 of Subarrays DP, we start the pattern with a basic problem of counting subarrays in an array using 2D Dynamic Programming. We will be focusing on 𝗜𝗻𝘁𝘂𝗶𝘁𝗶𝗼𝗻 𝗕𝘂𝗶𝗹𝗱𝗶𝗻𝗴 and 𝗟𝗲𝗮𝗿𝗻 𝗛𝗼𝘄 𝗦𝘂𝗯𝗮𝗿𝗿𝗮𝘆𝘀 𝗖𝗮𝗻 𝗕𝗲 𝗕𝘂𝗶𝗹𝘁 𝗥𝗲𝗰𝘂𝗿𝘀𝗶𝘃𝗲𝗹𝘆 and then optimized into an 𝗢(𝗡) 𝘁𝗶𝗺𝗲, 𝗢(𝟭) 𝘀𝗽𝗮𝗰𝗲 𝘀𝗼𝗹𝘂𝘁𝗶𝗼𝗻, where the naive greedy solution naturally leads to an O(N²) approach. So, overall we will be discussing 𝟯 𝗗𝗜𝗙𝗙𝗘𝗥𝗘𝗡𝗧 𝗕𝗢𝗧𝗧𝗢𝗠-𝗨𝗣 𝗔𝗣𝗣𝗥𝗢𝗔𝗖𝗛𝗘𝗦 to understand optimization [ 𝗜𝗡𝗖𝗟𝗨𝗗𝗘𝗦 𝗢(𝟭) 𝗦𝗣𝗔𝗖𝗘 𝗢𝗣𝗧𝗜𝗠𝗜𝗭𝗔𝗧𝗜𝗢𝗡 𝗔𝗣𝗣𝗥𝗢𝗔𝗖𝗛 ] choices clearly. Learn Recursion ⮕ Memoization ⮕ Tabulation ⮕ Space Optimization and build your DP foundation in Hindi.
🌐 Don’t forget to select your language in YouTube settings for better understanding and subtitles!
⮕ Code Link: https://github.com/hiren-j/dsaAffecti...
Welcome back to the ULTIMATE DP SERIES in HINDI | vHiren DP Series
This series is designed to help you master Dynamic Programming for coding interviews. From beginner to advanced level, this series covers 12 DP Patterns In which we'll be focusing on recursion, memoization, tabulation, space optimization—everything you need to know about DP. Here are the patterns which you'll be learning :-
⮕ 1D DP
⮕ Multi Dimensional DP
⮕ Subarrays DP
⮕ Subsequences DP
⮕ LIS DP
⮕ String DP
⮕ Stocks DP
⮕ Game Theory DP
⮕ Partition DP
⮕ Square Submatrix DP
⮕ Tree DP
⮕ Graph DP
Video Chapters :-
0:00 - Understanding The Problem
2:12 - How Problem Give Hints To Think Recursive
3:04 - Intuition Building
12:15 - Approaching Recursion
22:08 - Recursive Code
27:01 - Recursion Time + Approaching DP
28:02 - Code Memoization + Time Space Discussion
33:26 - Code Bottom Up + Time Space Discussion
📲 Follow Me On
🔹 LinkedIn: / hirenjoshi1630
🔹 GitHub: https://github.com/hiren-j
🔹 Instagram: / cuzvhiren
Intro Music Credits :-
Song: Blue Boi
Music provided by LAKEY INSPIRED
Music Video: • LAKEY INSPIRED - Blue Boi
🔔 Subscribe, Like & Share For More Series / Videos Like This.