首页
Java
登录
6mi
u
盘
搜
搜 索
Java
349. Intersection of Two Arrays python
349. Intersection of Two Arrays python
xiaoxiao
2021-02-28
8
给定两个数组,写一个函数来计算它们的交集。
class Solution(object): def intersection(self, nums1, nums2): """ :type nums1: List[int] :type nums2: List[int] :rtype: List[int] """ return list(set(nums1) & set(nums2))
转载请注明原文地址: https://www.6miu.com/read-1900007.html
技术
最新回复
(
0
)