add solution for intersection of linked list