two pointers思想 利用两个i, j两个下标,同时对序列进行扫描,以O(n)复杂度解决问题的一种思想, 如果能用这种思想解决问题,那么会大大降低程序的复杂度。 两个利用这个思想的例子: 1. 分析: 代码: 1 while (i < j){ 2 if (a[i] + a[j] == m){ ...
分类:
其他好文 时间:
2020-01-20 19:16:01
阅读次数:
71
The string APPAPT contains two PAT's as substrings. The first one is formed by the 2nd, the 4th, and the 6th characters, and the second one is formed ...
分类:
其他好文 时间:
2020-01-20 09:57:49
阅读次数:
93
Can you walk and talk at the same time? If so, you've experienced what it's like to be in two states at the same time. Hopefully, those two states hav ...
分类:
其他好文 时间:
2020-01-20 09:39:21
阅读次数:
70
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-01-19 23:53:57
阅读次数:
103
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-01-19 22:18:53
阅读次数:
107
3D点云做detection的一篇milestone paper。经典的two-stage方法(region proposal-based method)。思路来自于经典的faster rcnn。 整个模型如下图 图一. 整体模型 3D Point Cloud Representation 这篇文章 ...
分类:
Web程序 时间:
2020-01-19 12:57:44
阅读次数:
185
学而时习之,不亦悦乎! netty源码 public final class DefaultEventExecutorChooserFactory implements EventExecutorChooserFactory { public static final DefaultEventExe ...
分类:
其他好文 时间:
2020-01-19 12:35:39
阅读次数:
66
链接:https://codeforces.com/contest/1288/problem/C C. Two Arrays 题意:给定一个数n和一个数m,让构建两个数组a和b满足条件,1.数组中所有元素的取值在1~n之间,a和b数组长度是m。2. a数组是单调不递减的,b数组是单调不递增 3. 任 ...
分类:
其他好文 时间:
2020-01-19 09:24:01
阅读次数:
60
Given a binary tree, return the vertical order traversal of its nodes' values. (ie, from top to bottom, column by column). If two nodes are in the sam ...
分类:
其他好文 时间:
2020-01-19 00:06:21
阅读次数:
82
//数组解构 let arr = [1,2,3,4,5,6,7] let [one,two] = arr let [one, , ,four] = arr console.log(one,two,four) let arr = 'abcd' let [first, ,third] = arr con ...
分类:
编程语言 时间:
2020-01-19 00:03:31
阅读次数:
97