Given two business names provided as strings s1 and s2, determine their Jaccard similarity index. This index equals the number of distinct words the two names share divided by the total distinct words present across both names together. Round the result to two decimal places. When both strings are blank, return 1.0.
Example 1:
Input: s1 = "Roof Repair", s2 = "Larry's Roof Repair"
Output: 0.67
Explanation:
s1: ["Roof", "Repair"]s2: ["Larry's", "Roof", "Repair"]0.67.Example 2:
Input: s1 = "Plumbing Service", s2 = "Plumbing Service"
Output: 1.0
Example 3:
Input: s1 = "Coffee Shop", s2 = "Auto Repair"
Output: 0.0
Explanation: The two strings have zero words in common, giving an intersection size of 0 and a similarity of 0.0.