intersection of two lists && maximum gap