Easy approach using nested loops
Complexity
Time complexity: O(n^2)

Space complexity: O(1)
Code

<!-- Describe your approach to solving the problem. -->

# Complexity
- Time complexity: O(n^2)
<!-- Add your time complexity here, e.g. $$O(n)$$ -->

- Space complexity: O(1)
<!-- Add your space complexity here, e.g. $$O(n)$$ -->

# Code
```java []
class Solution {
    public int[] findIntersectionValues(int[] nums1, int[] nums2) {

        int count1 = 0;
        for(int i=0; i<nums1.length; i++){
            for(int j=0; j<nums2.length; j++){
                if(nums1[i] == nums2[j]){
                    count1++;
                    break;
                }
            }
        }
        int count2 = 0;
        for(int i=0; i<nums2.length; i++){
            for(int j=0; j<nums1.length; j++){
                if(nums2[i] == nums1[j]){
                    count2++;
                    break;
                }
            }
        }
        return new int[]{count1, count2}; 
    }
}
```
['Java']