码迷,mamicode.com
首页 >  
搜索关键字:two pointers    ( 12138个结果
Leetcode 220. 存在重复元素 III (Contains Duplicate III)
题目 Given an array of integers, find out whether there are two distinct indices i and j in the array such that the absolute difference between and is a ...
分类:其他好文   时间:2020-03-31 01:13:11    阅读次数:88
【pandas】函数映射:map() /apply() /applymap()
一、map() import pandas as pd import numpy as np df = pd.DataFrame({'key1' : ['a', 'a', 'b', 'b', 'a'], 'key2' : ['one', 'two', 'one', 'two', 'one'], 'd ...
分类:移动开发   时间:2020-03-30 13:15:36    阅读次数:97
[LeetCode] 349. Intersection of Two Arrays
两个数组的交集。题目即是题意,例子, Example 1: Input: nums1 = [1,2,2,1], nums2 = [2,2] Output: [2] Example 2: Input: nums1 = [4,9,5], nums2 = [9,4,9,8,4] Output: [9,4] ...
分类:其他好文   时间:2020-03-30 09:31:09    阅读次数:62
219. Contains Duplicate II
Given an array of integers and an integer k, find out whether there are two distinct indices i and j in the array such that nums[i] = nums[j] and the  ...
分类:其他好文   时间:2020-03-29 21:16:05    阅读次数:58
452. Minimum Number of Arrows to Burst Balloons
There are a number of spherical balloons spread in two-dimensional space. For each balloon, provided input is the start and end coordinates of the hor ...
分类:其他好文   时间:2020-03-29 12:34:44    阅读次数:57
Codeforces Round #627 (Div. 3) D. Pair of Topics(二分/直接遍历)
The next lecture in a high school requires two topics to be discussed. The ii -th topic is interesting by aiai units for the teacher and by bibi units ...
分类:其他好文   时间:2020-03-29 01:44:16    阅读次数:280
【GDOI2020模拟03.28】数二数(two) (计数动态规划):
? 先考虑如何判断一个询问集是否合法。 考虑询问一次$[l,r]$,能把$[1,l 1]∪[r+1,n]$和$[l,r]$区分开来。 现在定义一个块为一个没有被区分开极大的点集合。 当所有块的大小都是1的时候,这个方案就是合法。 ? 性质: 1.一个块是由若干连续段组成,比如下面这样: 111223 ...
分类:其他好文   时间:2020-03-28 23:33:05    阅读次数:84
LeetCode-两棵二叉搜索树的所有元素
注:LeetCode--树专题。 题目链接(1305):https://leetcode-cn.com/problems/all-elements-in-two-binary-search-trees/ 题目描述: 给你 root1 和 root2 这两棵二叉搜索树。 请你返回一个列表,其中包含 两 ...
分类:其他好文   时间:2020-03-27 21:47:16    阅读次数:80
1009 Product of Polynomials
This time, you are supposed to find A×B where A and B are two polynomials. Input Specification: Each input file contains one test case. Each case occu ...
分类:其他好文   时间:2020-03-27 21:20:29    阅读次数:79
4. Median of Two Sorted Arrays
Problem : There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays. The overall run time com ...
分类:其他好文   时间:2020-03-27 18:31:14    阅读次数:78
12138条   上一页 1 ... 34 35 36 37 38 ... 1214 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!