Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 1726. Tuple with Same Product
Count the number of ordered 4-tuples (a,b,c,d) of distinct elements from nums such that a*b = c*d by grouping all element-pairs by their product and using combinatorics on the number of pairs per product (feasible in O(n^2) time with a hashmap).
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.