easy bruteforce solution. python
Intuitionreturn the NUMBER of common elements in both listsApproachbrute force
go over each list one by one and see if elements of one appears in the other.
if
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->
return the NUMBER of common elements in both lists
# Approach
<!-- Describe your approach to solving the problem. -->
brute force
- go over each list one by one and see if elements of one appears in the other.
- if yes than add one to the common element counter
at the end return them as a list
# Complexity
- Time complexity:
<!-- Add your time complexity here, e.g. $$O(n)$$ -->
O(n*m)

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


- for i in nums1 → O(n)
- nums1[i] in nums2 → O(m) for each lookup (since in on a list is O(m))
# Code
```python3 []
class Solution:
    def findIntersectionValues(self, nums1: List[int], nums2: List[int]) -> List[int]:
      
        common_count1=0
        common_count2=0
        for i in range (len(nums1)):
            if(nums1[i] in nums2):
                common_count1+=1
        for i in range(len(nums2)):
            if(nums2[i] in nums1):
                common_count2+=1
     
        return [common_count1,common_count2]

```
['Python3']