Pregunta de entrevista de Yandex

Write a code to reverse a double-linked list.