1905. Count Sub Islands | Leetcode | Daily Problem | Graph | DFS | Medium | Java Solution

Pubblicato il: 28 agosto 2024
sul canale di: Code Monger
33
0

You are given two m x n binary matrices grid1 and grid2 containing only 0's (representing water) and 1's (representing land). An island is a group of 1's connected 4-directionally (horizontal or vertical). Any cells outside of the grid are considered water cells.

An island in grid2 is considered a sub-island if there is an island in grid1 that contains all the cells that make up this island in grid2.

Return the number of islands in grid2 that are considered sub-islands.

https://leetcode.com/problems/count-s...


In questa pagina del sito puoi guardare il video online 1905. Count Sub Islands | Leetcode | Daily Problem | Graph | DFS | Medium | Java Solution della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Code Monger 28 agosto 2024, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 33 volte e gli è piaciuto 0 spettatori. Buona visione!