PracHub
QuestionsPremiumLearningGuidesCheatsheetNEWCoaches
|Home/Coding & Algorithms/Shopify

Calculate Jaccard Similarity Score for Two String Lists

Last updated: Mar 29, 2026

Quick Overview

This question evaluates understanding of similarity metrics and competency in comparing string collections, reflecting knowledge of set-theoretic concepts and manipulation of collection data structures used in data processing.

  • Medium
  • Shopify
  • Coding & Algorithms
  • Data Scientist

Calculate Jaccard Similarity Score for Two String Lists

Company: Shopify

Role: Data Scientist

Category: Coding & Algorithms

Difficulty: Medium

Interview Round: Onsite

##### Scenario During pair programming, the interviewer asks you to compare two lists of merchant tags and quantify their similarity. ##### Question Implement a Python function that takes two lists of strings and returns their Jaccard similarity score. ##### Hints Convert both lists to sets, then compute |A ∩ B| ÷ |A ∪ B|.

Quick Answer: This question evaluates understanding of similarity metrics and competency in comparing string collections, reflecting knowledge of set-theoretic concepts and manipulation of collection data structures used in data processing.

Related Interview Questions

  • Compute Jaccard Similarity for Lists - Shopify (medium)
  • Implement URL Shortening Codec - Shopify (medium)
  • Simulate a rover fleet - Shopify (medium)
  • Simulate robot moves on a grid - Shopify (medium)
  • Implement a Capacity-Bounded Cache - Shopify (medium)
Shopify logo
Shopify
Aug 4, 2025, 10:55 AM
Data Scientist
Onsite
Coding & Algorithms
8
0
Scenario

During pair programming, the interviewer asks you to compare two lists of merchant tags and quantify their similarity.

Question

Implement a Python function that takes two lists of strings and returns their Jaccard similarity score.

Hints

Convert both lists to sets, then compute |A ∩ B| ÷ |A ∪ B|.

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

More Coding & Algorithms•More Shopify•More Data Scientist•Shopify Data Scientist•Shopify Coding & Algorithms•Data Scientist Coding & Algorithms
PracHub

Master your tech interviews with 7,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.