filmov
tv
Flood Fill - Leetcode 733 - Depth First Search - Breadth First Search - Matrix - Java

Показать описание
#amazoninterview #leetcode #coding #codinginterviewprep #leetcodejava #problemsolving #meta #algorithm
Flood Fill - Leetcode 733 - Depth First Search
The video demonstrates how to implement the flood fill algorithm using Depth First Search (DFS) in Java. The flood fill algorithm is used to fill an area of an image with a specified color, starting from a given pixel. The DFS algorithm is used to traverse the image and find all pixels that are connected to the starting pixel and have the same color.
Time Complexity O(mn) , Space Complexity - O(mn) for recursive stack
Disjoint Set (Union Find) Data Structure ( Union by Size, Union by Rank, Union by both Size and Rank)
Number of Islands (Leetcode : 200)
Number of Provinces (Leetcode 547)
Roads and Libraries:
Join Linkedin group Algorithm Avengers to learn and share your thoughts regarding Problem Solving, Data Structures and Algorithms:
The Video covers the following Topics:
Timestamp:
0:00 Problem Statement
2:31 Algorithm Overview
3:22 Coding while explaining each steps with example
13:38 Testing
14:39 Time and Space Complexity Analysis
@code_design
Flood Fill - Leetcode 733 - Depth First Search
The video demonstrates how to implement the flood fill algorithm using Depth First Search (DFS) in Java. The flood fill algorithm is used to fill an area of an image with a specified color, starting from a given pixel. The DFS algorithm is used to traverse the image and find all pixels that are connected to the starting pixel and have the same color.
Time Complexity O(mn) , Space Complexity - O(mn) for recursive stack
Disjoint Set (Union Find) Data Structure ( Union by Size, Union by Rank, Union by both Size and Rank)
Number of Islands (Leetcode : 200)
Number of Provinces (Leetcode 547)
Roads and Libraries:
Join Linkedin group Algorithm Avengers to learn and share your thoughts regarding Problem Solving, Data Structures and Algorithms:
The Video covers the following Topics:
Timestamp:
0:00 Problem Statement
2:31 Algorithm Overview
3:22 Coding while explaining each steps with example
13:38 Testing
14:39 Time and Space Complexity Analysis
@code_design