Equal Products
Problem Overview
- The problem asks if each products_a[i] can become products_b[i] by repeatedly globally swapping any two lowercase letters in products_a[i].
- Input: two arrays of n strings (product_a, product_b) with equal-length pairs; Output: a bool array indicating equality achievability per pair.
- Constraints: 1 ≤ n ≤ 1e5, lengths up to 2e5 per string, only lowercase letters, total length across all strings ≤ 5e5.
- Real-world context: Amazon warehouse teams aligning product labels; an Amazon interviews coding interview 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:
