|| C++ Solution 💻 || Easy 😊 || Explained🤔 || 
Find Common Elements Between Two ArraysIntuitionThe solution leverages a straightforward nested loop approach to compare elements in the two arrays. The goal is
# Find Common Elements Between Two Arrays

## Intuition
The solution leverages a straightforward nested loop approach to compare elements in the two arrays. The goal is to count common elements in both arrays by iterating through each pair of elements.

## Approach
1. For each element in the first array (`nums1`), compare it with every element in the second array (`nums2`). Count the matches and break the inner loop to avoid counting duplicates.
2. Similarly, iterate through each element in `nums2` and compare it with elements in `nums1` to count matches from the other perspective.
3. Return the counts as a result.

## Complexity
- **Time complexity:**  
 O(n * m), where \(n\) and \(m\) are the sizes of `nums1` and `nums2`, respectively.

- **Space complexity:**  
O(1)


# Code
```cpp []
class Solution {
public:
    vector<int> findIntersectionValues(vector<int>& nums1, vector<int>& nums2) {
        int count1{0},count2{0};
        for(int i=0;i<nums1.size();i++){
            for(int j=0;j<nums2.size();j++){
                if(nums1[i]==nums2[j]){
                    count1++;
                    break;
                }
            }
        }
        for(int i=0;i<nums2.size();i++){
            for(int j=0;j<nums1.size();j++){
                if(nums2[i]==nums1[j]){
                    count2++;
                    break;
                }
            }
        }
        return {count1,count2};
    }
};
```
['C++']