4SUM
class Solution {\n\n    public List> fourSum(int[] nums, int target) {\n        Arrays.sort(nums);\n        Set> set = new HashSet<>();\n        for(int i = 0; 
class Solution {\n\n    public List<List<Integer>> fourSum(int[] nums, int target) {\n        Arrays.sort(nums);\n        Set<List<Integer>> set = new HashSet<>();\n        for(int i = 0; i < nums.length; i++){\n            for(int j = i+1; j < nums.length; j++){\n                int start = j+1;\n                int end = nums.length-1;\n                while(end > start){\n                    int sum = nums[i]+ nums[j] + nums[start] + nums[end];\n                    if(sum == target){\n                        set.add(Arrays.asList(nums[i], nums[j], nums[start++], nums[end--]));\n                    }\n                    else if (sum > target) end --;\n                    else start++;\n                }\n            }\n        }\n          return new ArrayList<>(set);\t\n    }\n}\n\n**If you like to understand the solution than please Upvote me**
['Two Pointers', 'Java']