Check the problem statement here:
The intersection of Two Arrays:
https://leetcode.com/problems/interse...
Python for beginners:
https://www.youtube.com/watch?v=egq7Z...

Code:

class Solution:

def intersection(self, nums1: List[int], nums2: List[int]) -> List[int]:

output=[];

for i in nums1:

if(i in nums2 and i not in output):

output.append(i);

return output;

Telegram: https://t.me/clcoding_python

https://www.facebook.com/pirawenpython/

https://www.facebook.com/groups/piraw...

Code:

class Solution:

def intersection(self, nums1: List[int], nums2: List[int]) -> List[int]:

output=[];

for i in nums1:

if(i in nums2 and i not in output):

output.append(i);

return output;

Telegram: https://t.me/clcoding_python

https://www.facebook.com/pirawenpython/

https://www.facebook.com/groups/piraw...

## 0 Comments:

## Post a Comment