AKUNA CAPITAL Interview Question

Coding: number of connected components