Hello friends!! Today we will be taking a look at a leetcode problem similar to my last video (Number of Islands). This question also involves dfs traversal, but with a ~fancier~ technique - backtracking! Backtracking is an algorithm that is very helpful in solving this type of coding problems.
I know this video is longer than others, but I promise you - you will understand the solution so well that the interviewers will be impressed!!
This video is divided into 4 parts:
Part I: Problem description and example run-thru 0:12
Part II: Breaking down the problem 2:37
Part III: Step by step solution 6:17
Part IV: Actual code to the solution (with explanation!) 6:52
Hope you enjoy this video and happy coding!
Let's be friends:
jazwang.com
Email: [email protected]