filmov
tv
Number of Islands - leetcode 200 - Both bfs and dfs solutions explained
Показать описание
Today we will solve "Number of islands" problem from #leetcode. This question has been asked by #amazon , #apple , #bloomberg , #google , #facebook, #microsoft , #adobe, #uber and so many other companies.
We will walkthrough both breadth-first and depth-first search solutions to tackle this problem.
Please check the channel page for more #leetcode solution videos. Also don't forget to like, comment, and subscribe. Hope you enjoy the video!
Chapters:
0:00 Intro and question
0:20 Examples
0:44 General Idea
1:34 Where to use DFS and BFS Search methods
1:46 DFS Explained
2:31 BFS Explained
2:54 Solution
4:18 DFS Solution Code walkthrough
7:49 DFS using stack
8:49 BFS Solution Code walkthrough
11:49 Time and Space Complexity
We will walkthrough both breadth-first and depth-first search solutions to tackle this problem.
Please check the channel page for more #leetcode solution videos. Also don't forget to like, comment, and subscribe. Hope you enjoy the video!
Chapters:
0:00 Intro and question
0:20 Examples
0:44 General Idea
1:34 Where to use DFS and BFS Search methods
1:46 DFS Explained
2:31 BFS Explained
2:54 Solution
4:18 DFS Solution Code walkthrough
7:49 DFS using stack
8:49 BFS Solution Code walkthrough
11:49 Time and Space Complexity