NVIDIA interview question

Q: linked list problem