题目 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
一、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
两个数组的交集。题目即是题意,例子, 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
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
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
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
? 先考虑如何判断一个询问集是否合法。 考虑询问一次$[l,r]$,能把$[1,l 1]∪[r+1,n]$和$[l,r]$区分开来。 现在定义一个块为一个没有被区分开极大的点集合。 当所有块的大小都是1的时候,这个方案就是合法。 ? 性质: 1.一个块是由若干连续段组成,比如下面这样: 111223 ...
分类:
其他好文 时间:
2020-03-28 23:33:05
阅读次数:
84
注:LeetCode--树专题。 题目链接(1305):https://leetcode-cn.com/problems/all-elements-in-two-binary-search-trees/ 题目描述: 给你 root1 和 root2 这两棵二叉搜索树。 请你返回一个列表,其中包含 两 ...
分类:
其他好文 时间:
2020-03-27 21:47:16
阅读次数:
80
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
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