Bloomberg Interview Question

Find the intersection of two linked list.

Interview Answer

Anonymous

Sep 12, 2012

iterate one list at a time until iterator1->next next 0 , this works also to find a loop in a linked list instead of the turtle and rabbit algorithm.