GENERAL DYNAMICS Hiring | Online Interview Question | On-Campus OA (2022)
Question · Posted Jun 2026
Problem: Minimum Number of Days to Disconnect Island Problem Statement You are given a binary matrix grid where: 1 represents land. 0 represents water. An island is formed by connecting adjacent land cells horizontally or vertically (4-directionally). Return the minimum number of days required to disconnect the island. An island is considered disconnected if there are zero islands or more than one island. Example Input grid = [[0,1,1,0], [0,1,1,0], [0,0,0,0]] Output 2 ...
The full answer & interview discussion are available to premium members.
Log in Create a free account