Domanda di colloquio di BNY

Linkedlist reverse question in hackerrank need to submit