Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 454. 4Sum II
Count the number of quadruplets (i,j,k,l) with nums1[i]+nums2[j]+nums3[k]+nums4[l]==0; exploit n ≤ 200 by using pairwise-sum frequencies (e.g., sums of two arrays and matching complementary sums from the other two) to solve in O(n^2) time.
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.