Pregunta de entrevista de Capital One

I got a linked list question on CodeSignal.