Java code
IntuitionApproachComplexity
Time complexity:

Space complexity:
Code
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->

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

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

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

# Code
```java []
class Solution {
    public int[] findIntersectionValues(int[] nums1, int[] nums2) {
        int[] res = new int[2];
        int indexCount1 = 0, indexCount2 = 0;
        for(int num : nums1){
            for(int i=0;i<nums2.length;i++){
                if(num == nums2[i])
                {
                    indexCount2++;
                    break;
                }
            }
        }

        for(int num : nums2){
            for(int i=0;i<nums1.length;i++){
                if(num == nums1[i])
                {
                    indexCount1++;
                    break;
                }
            }
        }

        res[0] = indexCount2;
        res[1] = indexCount1;
        return res;
    }
}
```
['Java']