Given an n x n binary grid of 0s (water) and 1s (land) containing exactly two disjoint islands (cells with 1 connected 4-directionally), return the minimum number of 0-cells that must be flipped to 1 to connect the two islands via a 4-directional path of 1s. Describe your algorithm, justify its correctness, and analyze time and space complexity. Follow-ups: (a) Implement an approach that first identifies one island and then expands outward to find the other; (b) Explain techniques to avoid recursion stack overflow when discovering an island; (c) Discuss scalability for grids up to 2000 x 2000; (d) Provide a solution that avoids mutating the input grid if required.