Imc

Interview Question

Software Developer Interview
Imc

In a 2D array of integers, adjacent positions (vertically or horizontally) are considered part of the same 'country' if they contain the same integer. Given a 2D array of integers, compute the number of distinct countries in the array.

Unlock the Full Solution

Enter your email to get instant access to the complete solution, explanation, and similar practice problems.

Insights on 100+ quant firms, understand where to apply, and maximize your chances.

Get the official 2025 QB Quant Firm Tier List

Check your email inbox — you should get the interview in 1-2 minutes!