share my O(n^2) C++ 800ms easy-understanding code

  • 1

    class Solution {
    int fourSumCount(vector<int>& A, vector<int>& B, vector<int>& C, vector<int>& D) {
    unordered_map<int, int> mp;
    int ans = 0;
    for (int a:A)
    for (int b:B)
    for(int c:C)
    for(int d:D)
    return ans;


    • list item

Log in to reply

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.