$item === $search); $sum += ($search * count($rightList)); } return $sum; } [$list1, $list2] = parseLists(); $sumOfDifference = diffSum($list1, $list2); $similarityScore = similarityScore($list1, $list2); echo "Part 1: Total distance: $sumOfDifference\n"; echo "Part 2: Similarity score: $similarityScore\n";