NetApp interview question

Coding based based on linked list