Amazon Robotics Interview Question

To find connected components on a 2D matrix.