✅Simple Java Solutions
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\n    public List<List<Integer>> findDifference(int[] nums1, int[] nums2) {\n        List<List<Integer>> list = new LinkedList<>();\n        list.add(find(nums1 , nums2));\n        list.add(find(nums2 , nums1));\n        return list;\n    }\n\n    public static List<Integer> find(int[] nums1, int[] nums2)\n    {\n        HashSet<Integer> set = new HashSet<>();\n        for (int n : nums2) set.add(n);\n\n        HashSet<Integer> list = new HashSet<>();\n\n        for (int n1 : nums1 )\n        {\n            if (!set.contains(n1))\n            {\n                list.add(n1);\n            }\n        }\n        return list.stream().toList();\n    }\n}\n```\n## For additional problem-solving solutions, you can explore my repository on GitHub: [GitHub Repository](https://github.com/ahmedna126/java_leetcode_challenges)\n\n\n\n![abcd1.jpeg](https://assets.leetcode.com/users/images/29517929-81da-44a0-8eb2-91f7475408c1_1695855295.7307534.jpeg)\n\n\n
['Java']