Day 123 || Hash Table || O(m+n) time and O(max(m,n)) space
\n\n# Code :\nC++ []\nclass Solution {\npublic:\n    vector<vector<int>> findDifference(vector<int>& nums1, vector<int>& nums2) {\n        unordered_set<int> s1
\n\n# Code :\n```C++ []\nclass Solution {\npublic:\n    vector<vector<int>> findDifference(vector<int>& nums1, vector<int>& nums2) {\n        unordered_set<int> s1, s2;\n        vector<vector<int>> answer(2);\n        for (auto num : nums1)\n            s1.insert(num);\n        for (auto num : nums2)\n            s2.insert(num);\n        for (auto num : s1) {\n            if (s2.find(num) == s2.end()) {\n                answer[0].push_back(num);\n            }\n        }\n        for (auto num : s2) {\n            if (s1.find(num) == s1.end()) {\n                answer[1].push_back(num);\n            }\n        }\n        return answer;\n    }\n};\n```\n\n# Time Complexity and Space Complexity:\n- **Time Complexity :** **O(m + n)**, where m is the size of nums1 and n is the size of nums2\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- **Space Complexity :** **O(max(m, n))**\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->
['Hash Table', 'C++']