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
Coding & Algorithms
Software Engineer
Meesho
November 29, 2026
Software Engineer
Phone Screen
Coding & Algorithms
Easy

0

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
hashing
string normalization
grouping
deduplication
catalog quality
How to Approach This
  1. Clarify input constraints and edge cases before writing code.
  2. Walk through your approach verbally and confirm with the interviewer before coding.
  3. Start with a brute force solution, then optimize. Mention time and space complexity.
  4. Test your solution with examples, including edge cases like empty input or duplicates.
  5. 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 Problems
Sample 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
  1. Normalize: lowercase, extract alphanumeric tokens with a regex, drop stopwords, dedupe and sort, so Trendy Cotton Kurti for Women and cotton KURTI - women both become ('cotton', 'kurti').
  2. ...

Submit Your Answer
Markdown supported

Related Questions