Number of Duplicates

Problem Overview

  • Determine how many products are duplicates, where duplicates share the same name, price, and weight.
  • Input: arrays name[i], price[i], weight[i]; Output: an integer count of duplicate products in the list.
  • Constraints: 1 ≤ n ≤ 1e5; price[i], weight[i] in [1, 1000]; name[i] lowercase a–z up to 10 chars.
  • Real-world context: deduplicating e-commerce inventory; classic coding interview problem and interview question.

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Input Variables
Execution Result: