Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private static int BozhoScore(HashSet<string> firstPicTags, HashSet<string> secondPicTags)
- {
- var intersection = new HashSet<string>(firstPicTags);
- intersection.IntersectWith(secondPicTags);
- var intersectionCount = intersection.Count;
- var firstDiffSecondCount = firstPicTags.Except(secondPicTags).Count();
- //Could probably add slight improvements. allCount - (intersect + firstDiff)
- var secondDiffFirstCount = secondPicTags.Except(firstPicTags).Count();
- return Math.Min(Math.Min(intersectionCount, firstDiffSecondCount), secondDiffFirstCount);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement