Pregunta de entrevista de Numetric

Write a function that will traverse a linked list, change all the memory pointers so the pointers to a child and parent are reversed and return the last item in the list.