Screening Round ( 1hr )
Question 1
Given a 2D matrix with 1’s and 0’s. It’s given that there are exactly 2 islands in the matrix ( 4 directionally connected ). Find the minimum number of 0’s to flip to 1’s inorder to have a single island in the matrix.
Solution- BFS from any of the islands to the second. Also suggest ways to reduce iterations by considering only the edge of islands. And also suggest to use bi-drectional BFS.
Round 1 ( 1hr )
Given a Terrain (2D - land and water) implement -
Round 2 ( 1hr )
Design Twitter like system. Implement below functionality -