You are given two m x n binary matrices grid1 and grid2, where 1 is land and 0 is water. An island is a group of land cells connected 4-directionally. An island in grid2 is a sub-island if every cell of it is also land in grid1. Return the number of islands in grid2 that are sub-islands.
You are given two m x n binary matrices grid1 and grid2, where 1 is land and 0 is water. An island is a group of land cells connected 4-directionally. An island in grid2 is a sub-island if every cell of it is also land in grid1. Return the number of islands in grid2 that are sub-islands.