union and intersect of two linkedlists