算法介绍 + 算法简介:尺取法,又名two pointers(双指针法),是一种简洁而有效的dp优化算法,常见于将时间复杂度O($n^2$)的一般dp优化为O(n)。 + 适用条件:限制变量随着指针的单向移动,而呈单调变化。 + 实现细节: 1. 申请两个指针$p_1$,$p_2$。 2. 固定$p ...
分类:
其他好文 时间:
2020-03-05 20:52:17
阅读次数:
75
"I Count Two Three" 可以预处理出所有的满足题目并且比1e9小的的数,不会很多。排个序。询问的时候二分查找就好了 ...
分类:
其他好文 时间:
2020-03-04 23:33:43
阅读次数:
99
练习地址:https://leetcode-cn.com/problems/combine-two-tables/ 表1: Person + + + | 列名 | 类型 | + + + | PersonId | int | | FirstName | varchar | | LastName | v ...
分类:
编程语言 时间:
2020-03-04 19:14:25
阅读次数:
85
There are three popular metrics to measure the correlation between two random variables: Pearson's correlation coefficient, Kendall's tau and Spearman ...
分类:
其他好文 时间:
2020-03-04 09:49:24
阅读次数:
112
A.Two Rabbits Gildong厌倦了参加过多次Codeforce攻击,决定在公园休息一下。他坐在长凳上,很快他发现两只兔子在跳来跳去。一只兔子比另一只更高。 他注意到两只兔子在互相跳来跳去。两只兔子的位置可以表示为水平线上的整数坐标。较高的兔子当前位于位置x,而较短的兔子当前位于位置y( ...
分类:
其他好文 时间:
2020-03-04 09:25:56
阅读次数:
83
Design and implement a TwoSum class. It should support the following operations: add and find. add - Add the number to an internal data structure.find ...
分类:
其他好文 时间:
2020-03-04 09:16:12
阅读次数:
75
1.任务及要求 Diff Two Arrays 比较两个数组,然后返回一个新数组,该数组的元素为两个给定数组中所有独有的数组元素。换言之,返回两个数组的差异。 如果你被难住了,记得使用 Read-Search-Ask尝试与他人结伴编程、编写你自己的代码。 这是一些对你有帮助的资源: Comparis ...
分类:
其他好文 时间:
2020-03-03 15:02:09
阅读次数:
76
SSD(Single Shot MultiBox Detector)系列算法属于one-stage算法; SSD算法采用直接回归计算出目标类别和位置。处理对象为原始图像经过卷积之后的feature map。 与two-stage算法的区别是,不需要proposal box候选框的提取,即不需要RPN ...
分类:
编程语言 时间:
2020-03-03 10:50:17
阅读次数:
95
"Link" 题意: 已知 $a,b$,任取 $x$,每次进行两种操作的一种 操作一:$a x,b 2x$ 操作二:$a 2x,b x$ 问最终能否让 $a,b$ 都为 $0$ 思路: 易得成立的条件为:$(a+b)\mod3==0$ && $max(a,b)\le min(a,b) \times ...
分类:
其他好文 时间:
2020-03-02 22:53:24
阅读次数:
74
160. 相交链表 [toc] 1、试题介绍 编写一个程序,找到两个单链表相交的起始节点。 试题链接:https://leetcode cn.com/problems/intersection of two linked lists/ 2、java做法 2.1、双重循环 测试结果: 2.2、双指针做 ...
分类:
其他好文 时间:
2020-03-02 20:41:45
阅读次数:
64