题目描述:

自己的提交:

class Solution:
def arraysIntersection(self, arr1: List[int], arr2: List[int], arr3: List[int]) -> List[int]:
arr = arr1 + arr2 +arr3
res = []
for i in arr:
if arr.count(i)==3 and i not in res:
res.append(i)
return res

另:

class Solution(object):
def arraysIntersection(self, A, B, C):
S = set(A) & set(B) & set(C)
return sorted(S)

leetcode-第10周双周赛-5079-三个有序数组的交集的更多相关文章

  1. [LeetCode] Convert Sorted Array to Binary Search Tree 将有序数组转为二叉搜索树

    Given an array where elements are sorted in ascending order, convert it to a height balanced BST. 这道 ...

  2. Java实现 LeetCode第30场双周赛 (题号5177,5445,5446,5447)

    这套题不算难,但是因为是昨天晚上太晚了,好久没有大晚上写过代码了,有点不适应,今天上午一看还是挺简单的 5177. 转变日期格式   给你一个字符串 date ,它的格式为 Day Month Yea ...

  3. LeetCode 第 15 场双周赛

    1287.有序数组中出现次数超过25%的元素 1288.删除被覆盖区间 1286.字母组合迭代器 1289.下降路径最小和 II 下降和不能只保留原数组中最小的两个,hacked. 1287.有序数组 ...

  4. [LeetCode] 4. Median of Two Sorted Arrays 两个有序数组的中位数

    There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two ...

  5. [LeetCode] Find Minimum in Rotated Sorted Array 寻找旋转有序数组的最小值

    Suppose a sorted array is rotated at some pivot unknown to you beforehand. (i.e., 0 1 2 4 5 6 7 migh ...

  6. [LeetCode] 80. Remove Duplicates from Sorted Array II ☆☆☆(从有序数组中删除重复项之二)

    https://leetcode.com/problems/remove-duplicates-from-sorted-array-ii/discuss/27976/3-6-easy-lines-C% ...

  7. LeetCode 33 Search in Rotated Sorted Array(循环有序数组中进行查找操作)

    题目链接 :https://leetcode.com/problems/search-in-rotated-sorted-array/?tab=Description   Problem :当前的数组 ...

  8. LeetCode第8场双周赛(Java)

    这次我只做对一题. 原因是题目返回值类型有误,写的是 String[] ,实际上应该返回 List<String> . 好吧,只能自认倒霉.就当涨涨经验. 5068. 前后拼接 解题思路 ...

  9. LeetCode 第 14 场双周赛

    基础的 api 还是不够熟悉啊 5112. 十六进制魔术数字 class Solution { public: char *lltoa(long long num, char *str, int ra ...

  10. leetcode-第10周双周赛-5081-歩进数

    题目描述: 自己的提交:参考全排列 class Solution: def countSteppingNumbers(self, low: int, high: int) -> List[int ...

随机推荐

  1. sublimeText3的安装及插件的配置使用

    这里主要记录一些关于sublime text的配置,并且参照了别人的博客归纳的. 一.下载sublime text   http://www.sublimetext.com/3二.安装Package ...

  2. hud 3183

    题意:给出n个数字的字符串,要求你删除m个数字后,得到的数字最小. 分析:删除m个,就是选n-m个,而且,选的第一个数,肯定在(0—(n-m-1))中,第二个就在(第一个的下一位—(n-m-2)中.就 ...

  3. kali环境配置

    1.配置源及刷新软件列表 建议用官方默认源: # vi /etc/apt/sources.list deb http://http.kali.org/kali kali-rolling main no ...

  4. Jquery中$.get(),$.post(),$.ajax(),$.getJSON(),$.getScript(),$.load()的用法总结

    参考文档 :  https://blog.csdn.net/jiandanokok/article/details/48809717 本文是对Jquery中$.get(),$.post(),$.aja ...

  5. Saks就const解释

    In my last column, I discussed one of the reasons why the rules by which a compiler can place data i ...

  6. Java new和getInstance

    下面是一个例子,为什么要把这个类实例化?有什么好处? //实例化 public static DBConnect instance; public static DBConnect getInstan ...

  7. NX二次开发-UFUN CSYS坐标系转换UF_CSYS_map_point

    1 NX9+VS2012 2 3 #include <uf.h> 4 #include <uf_curve.h> 5 #include <uf_csys.h> 6 ...

  8. 堡垒机介绍及实现 (使用python django实现)(一)

    堡垒机介绍及实现 (使用python django实现)(一) 堡垒机的功能 我们在使用服务器的时候,通常的方式是 ssh user@ip 然后输入password 多人同时使用,就需要多个账号.这时 ...

  9. 使用 Lookaside List 分配内存

    1. 概述 windows 提供了一种基于 lookaside list 的快速内存分配方案,区别于一般的使用 ExAllocatePoolWithTag() 系列函数的内存分配方式.每次从 look ...

  10. 『BASH』——Learn BashScript from Daniel Robbins——[003]

    ABSTRACT: Daniel Robbins is best known as the creator of Gentoo Linux and author of many IBM develop ...