Pergunta de entrevista da empresa Google

Linked list version of the "Island Counting" problem