Pregunta de entrevista de GE HealthCare

Write a program to pick the LinkedList head stored in an array such that each list falls into the same group.