Group Near Duplicate Supplier Listings By Normalized Title And Price
Last updated: November 29, 2026
Quick Overview
Given a list of listings as (listing_id, title, price), group listings that are likely the same product uploaded by different suppliers: titles that match after lowercasing, removing punctuation and filler words, and ignoring word order, with prices in the same 10 rupee bucket. Return the groups of size two or more.
Meesho
November 29, 20260
0
0 solved
Given a list of listings as (listing_id, title, price), group listings that are likely the same product uploaded by different suppliers: titles that match after lowercasing, removing punctuation and filler words, and ignoring word order, with prices in the same 10 rupee bucket. Return the groups of size two or more.
Meesho's catalog is dominated by small unbranded suppliers who often upload the same kurti or saree with slightly different titles, which clutters the feed and search. This warm-up checks whether you can design a canonical key, use a hash map cleanly, and reason about where a simple key breaks.
What the Interviewer Expects
- Defines a canonical key from normalized tokens and a price bucket
- Uses a dictionary of lists for a single linear pass
- Treats word order and filler words explicitly rather than by accident
- Returns deterministic output (sorted ids and groups)
- Names the bucket-boundary problem without being prompted
Key Topics to Cover
How to Approach This
- Clarify input constraints and edge cases before writing code.
- Walk through your approach verbally and confirm with the interviewer before coding.
- Start with a brute force solution, then optimize. Mention time and space complexity.
- Test your solution with examples, including edge cases like empty input or duplicates.
- Consider common patterns: sliding window, two pointers, hash map, BFS/DFS, dynamic programming.
Possible Follow-up Questions
- Two listings priced 304 and 306 rupees fall into different buckets. How do you fix that?
- How would you extend this to titles in Hindi or Hinglish transliteration?
- Titles match but images differ. How would you add an image signal at catalog scale?
- How would you run this on 100 million listings as a batch job?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice DSA ProblemsSample Answer
Requirements
Input: listings, a list of (listing_id, title, price) with price in rupees. Output: a sorted list of groups (each a sorted list of ids) with at least two listings. Two listings are duplicates when...
High-Level Design
- Normalize: lowercase, extract alphanumeric tokens with a regex, drop stopwords, dedupe and sort, so
Trendy Cotton Kurti for Womenandcotton KURTI - womenboth become('cotton', 'kurti'). - ...