The question was the linked merchant problem.
P1:
Each merchant has a companyName, an Email and a Phone. If any one of them matches, return it. (You are given the source merchant.)
P2:
companyName, Email and Phone each have a score, for example 20, 30 and 50. You are given a threshold, and it only counts as a match if the score goes over the threshold.
P3:
2-hop match. Just run the for loop twice. The first pass starts from the source, and the second pass starts directly from the matches found in the first pass. Find all the matches, then return. You can use a hashset to dedupe.
Discussion
Loading comments…