94% javascript fast very easy to understand solution with video explanation!
Here is video for explain if it is helpful please subscribe! :\n\nhttps://youtu.be/U4cX-QMlmgA\n\n# Code\n\n/**\n * @param {number[]} nums\n * @param {number} t
Here is video for explain if it is helpful please subscribe! :\n\nhttps://youtu.be/U4cX-QMlmgA\n\n# Code\n```\n/**\n * @param {number[]} nums\n * @param {number} target\n * @return {number[][]}\n */\nvar fourSum = function(nums, target) {\n    let res = []\n    nums.sort((a,b)=>a-b)\n\n    for(let i =0; i< nums.length-3;i++){\n        for(let j =i+1; j<nums.length-2;j++){\n            let f = nums[i];\n            let s = nums[j];\n            let left = j+1;\n            let right = nums.length-1;\n            while(left<right){\n                let sum = f + s + nums[left] + nums[right];\n                if(sum < target) left++\n                else if(sum > target) right--\n                else {\n                    res.push([f,s,nums[left],nums[right]]);\n                    while(nums[left] == nums[left+1])left++\n                    while(nums[right] == nums[right-1]) right--\n                    left++\n                    right--\n                }\n            }\n            while(nums[j] == nums[j+1]) j++\n        }\n        while(nums[i] == nums[i+1]) i++\n    }\n    return res\n};\n```
['JavaScript']