Simple java solution
Complexity\n- Time complexity: O(n^2)\n\n- Space complexity: O(1)\n\n# Code\n\nclass Solution {\n    public int[] findIntersectionValues(int[] nums1, int[] nums
# Complexity\n- Time complexity: $$O(n^2)$$\n\n- Space complexity: $$O(1)$$\n\n# Code\n```\nclass Solution {\n    public int[] findIntersectionValues(int[] nums1, int[] nums2) {\n        int count=0;\n        int ans[]=new int[2];\n        for(int i=0;i<nums1.length;i++)\n        {\n            for(int j=0;j<nums2.length;j++)\n            {\n                if(nums1[i]==nums2[j])\n                {\n                    count++;\n                    break;\n                }\n            }\n        }\n        \n        ans[0]=count;\n        count=0;\n        for(int i=0;i<nums2.length;i++)\n        {\n            for(int j=0;j<nums1.length;j++)\n            {\n                if(nums1[j]==nums2[i])\n                {\n                    count++;\n                    break;\n                }\n            }\n        }\n        ans[1]=count;\n        return ans;\n    }\n}\n```
['Java']