COF-C02 · Question #546
Which function returns an integer between 0 and 100 when used to calculate the similarity of two strings?
The correct answer is B. JAROWINKLER_SIMILARITY. JAROWINKLER_SIMILARITY(str1, str2) returns an integer between 0 and 100, where 0 means no similarity and 100 means identical strings. It implements the Jaro-Winkler distance algorithm, which is particularly effective for short strings and typo detection. By contrast…
Question
Which function returns an integer between 0 and 100 when used to calculate the similarity of two strings?
Options
- AAPPROXIMATE_SIMILARITY
- BJAROWINKLER_SIMILARITY
- CAPPROXIMATE_JACCARD_INDEX
- DMINHASH COMBINE
How the community answered
(64 responses)- A5% (3)
- B91% (58)
- C2% (1)
- D3% (2)
Explanation
JAROWINKLER_SIMILARITY(str1, str2) returns an integer between 0 and 100, where 0 means no similarity and 100 means identical strings. It implements the Jaro-Winkler distance algorithm, which is particularly effective for short strings and typo detection. By contrast, APPROXIMATE_JACCARD_INDEX returns a float between 0.0 and 1.0, not an integer in the 0–100 range.
Topics
Community Discussion
No community discussion yet for this question.