Longest Increasing Path in a Matrix | Live Coding with Explanation | Leetcode - 329

  Рет қаралды 11,627

Algorithms Made Easy

Algorithms Made Easy

Күн бұрын

Пікірлер
@AlgorithmsMadeEasy
@AlgorithmsMadeEasy 3 жыл бұрын
We hope you all are enjoying our videos!!! Don't forget to leave a comment!!! Please like the video to support us!!! Questions you might like: ✅✅✅[ Tree Data Structure] : kzbin.info/aero/PLJtzaiEpVo2zx-rCqLMmcFEpZw1UpGWls ✅✅✅[ Graphs Data Structure] : kzbin.info/aero/PLJtzaiEpVo2xg89cZzZCHqX03a1Vb6w7C ✅✅✅[ February Leetcoding Challenge] : kzbin.info/aero/PLJtzaiEpVo2wrfvII0eZQsPm-MZCmHodm ✅✅✅[ January Leetcoding Challenge] : kzbin.info/aero/PLJtzaiEpVo2wCalBcRcNjXQ0C6ku3dRkn ✅✅✅[ February Leetcoding Challenge] : kzbin.info/aero/PLJtzaiEpVo2wrfvII0eZQsPm-MZCmHodm ✅✅✅[ March Leetcoding Challenge] : kzbin.info/aero/PLJtzaiEpVo2zH-YC5ZiptbAvw2QZkmyk9 ✅✅✅[ December Leetcoding Challenge] : kzbin.info/aero/PLJtzaiEpVo2xo8OdPZxrpybGR8FmzZpCA ✅✅✅[ November Leetcoding Challenge] : kzbin.info/aero/PLJtzaiEpVo2yMYz5RPH6pfB0wNnwWsK7e ✅✅✅[ August Leetcoding Challenge] : kzbin.info/aero/PLJtzaiEpVo2xu4h0gYQzvOMboclK_pZMe ✅✅✅[ July Leetcoding challenges] : kzbin.info/aero/PLJtzaiEpVo2wrUwkvexbC-vbUqVIy7qC- ✅✅✅[ June Leetcoding challenges] : kzbin.info/aero/PLJtzaiEpVo2xIPptnCvUtKrUcod2zAKG ✅✅✅[ May Leetcoding challenges] : kzbin.info/aero/PLJtzaiEpVo2wRmUCq96zsUwOVD6p66K9e ✅✅✅Cracking the Coding Interview - Unique String: kzbin.info/aero/PLJtzaiEpVo2xXf4LZb3y_BopOnLC1L4mE Struggling in a question?? Leave in a comment and we will make a video!!!🙂🙂🙂
@spoorthibasu
@spoorthibasu 2 ай бұрын
We aren't using visited array here because we are only allowed to move to cells where the value is greater than the current cell ( matrix[x][y] >matrix[i][j] ). This constraint prevents cycles, because once you move to a larger number, you can never return to a smaller one.
@erickvidbaz3086
@erickvidbaz3086 3 жыл бұрын
Thank you Khushbu, your graphical explanation always help me to catch the algorithm, really appreciated.
@AlgorithmsMadeEasy
@AlgorithmsMadeEasy 3 жыл бұрын
Thanks Erick!! 😊
@bharathkalyans
@bharathkalyans 2 жыл бұрын
I am surprised why aren't we using any boolean [][] visited to keep track of the traversal![I am assuming as the value wont be big enough to consider to out current path length!!]
@souravkumar-hl2ot
@souravkumar-hl2ot 2 жыл бұрын
Hey actually I tried using the same visited array but the problem is that if we keep on marking visited cells as true then the cells will become inaccessible for some paths since the cell has already been marked true by some previous travesing so we will not get correct answer
@bharathkalyans
@bharathkalyans 2 жыл бұрын
@@souravkumar-hl2ot why don't you backtrack by making them false again??
@sriramkrishnamurthy4473
@sriramkrishnamurthy4473 2 жыл бұрын
U have the sweetest voice didi !!!!!! Much Love ❤️😃👍👍
@sumitnimesh9320
@sumitnimesh9320 3 жыл бұрын
thankyou for the simple and step by step explained solution and your voice is so sweet
@AlgorithmsMadeEasy
@AlgorithmsMadeEasy 3 жыл бұрын
Most welcome 😊
@siddharthdwivedi3263
@siddharthdwivedi3263 3 жыл бұрын
Clarity at its best!!Thank you!!
@Cloud-577
@Cloud-577 3 жыл бұрын
Thank you! I would appreciate if you can include a walk through the code
@rishabhsamrajain9313
@rishabhsamrajain9313 2 жыл бұрын
Can you explain how time complexity for the technique after memoization is O(mn) and not larger than that? How we can know the time complexity without doing memoization?
@sapirkikoz7518
@sapirkikoz7518 2 жыл бұрын
Great video thank you!
@rahulsahay19
@rahulsahay19 2 жыл бұрын
very nice explaination.
@harshitchoukse2602
@harshitchoukse2602 2 жыл бұрын
What will be the time complexity for brute force??
@tannusharma2285
@tannusharma2285 3 жыл бұрын
Thank u so much...God Bless u..
@AlgorithmsMadeEasy
@AlgorithmsMadeEasy 2 жыл бұрын
Most welcome!! Don't forget to subscribe!!! :)
@randomone3073
@randomone3073 3 жыл бұрын
Can you explain the time complexity after memorization?
@ashwinvarma9349
@ashwinvarma9349 3 жыл бұрын
Mam, can u also show cpp code as well for upcoming videos?
@kirant5548
@kirant5548 3 жыл бұрын
good one
@AlgorithmsMadeEasy
@AlgorithmsMadeEasy 2 жыл бұрын
Thanks
@nalingoyal881
@nalingoyal881 3 жыл бұрын
what was the Time complexity of brute force approach
@harshitchoukse2602
@harshitchoukse2602 2 жыл бұрын
I think O(N^2) where is N is total number of elements in matrix
@jayantshukla9025
@jayantshukla9025 10 ай бұрын
Why don't we take any visited array here??
@rechinraj111
@rechinraj111 3 жыл бұрын
U guys are SUPER se UPER 👍😎
@AlgorithmsMadeEasy
@AlgorithmsMadeEasy 3 жыл бұрын
Thanks!!! 😊
@ravitiwari2160
@ravitiwari2160 Жыл бұрын
Could someone please explain how this code works without marking cells as visited?
@vinamrasangal8436
@vinamrasangal8436 Жыл бұрын
no
@jailudhani8841
@jailudhani8841 3 жыл бұрын
Suppose, I need to give complete path as answer, how to solve then, can you help me in that case.
@vinamrasangal8436
@vinamrasangal8436 Жыл бұрын
shut up man
@ayushsingh3877
@ayushsingh3877 3 жыл бұрын
You are not explaning in matrix how it is working, the given example of matrix was easy one. You are just simply writting your memorized code.
Longest Increasing Path in a Matrix - Leetcode 329
17:45
NeetCode
Рет қаралды 65 М.
Longest Increasing Path in a Matrix (DFS + Memoization)
18:47
AlgosWithMichael
Рет қаралды 19 М.
Creative Justice at the Checkout: Bananas and Eggs Showdown #shorts
00:18
Fabiosa Best Lifehacks
Рет қаралды 8 МЛН
Ice Cream or Surprise Trip Around the World?
00:31
Hungry FAM
Рет қаралды 22 МЛН
Thank you Santa
00:13
Nadir Show
Рет қаралды 36 МЛН
Pacific Atlantic Water Flow | Live Coding with Explanation | Leetcode - 417
13:32
Course Schedule III | Live Coding with Explanation | Leetcode - 630
13:38
Algorithms Made Easy
Рет қаралды 11 М.
Path With Minimum Effort | Live Coding with Explanation | Leetcode #1631
16:48
Algorithms Made Easy
Рет қаралды 10 М.
Leetcode 329. Hard || Longest Increasing Path in a Matrix
20:56
Code with Alisha
Рет қаралды 7 М.
Simplify Path | Live Coding with Explanation | Leetcode - 71
11:08
Algorithms Made Easy
Рет қаралды 10 М.
Rotate Image | Live Coding with Explanation | Leetcode - 48
10:12
Algorithms Made Easy
Рет қаралды 9 М.