Amazon interview question

LinkedList based question involving GCD