原题链接在这里:https://leetcode.com/problems/k-closest-points-to-origin/ 题目: We have a list of points on the plane. Find the K closest points to the origin ( ...
分类:
其他好文 时间:
2020-01-20 09:25:46
阅读次数:
72
https://answers.microsoft.com/zh hans/windows/forum/windows_7 update/win7 windows/59739c4b cc01 4d26 9a67 759d92bbacca ...
先看一段效率极其低下的代码 startOne = System.currentTimeMillis(); if (titlelists != null && titlelists.size() > 0) { for (int i = 0; i < titlelists.size(); i++) { ...
分类:
其他好文 时间:
2020-01-19 18:56:02
阅读次数:
75
Given an array A of strings made only from lowercase letters, return a list of all characters that show up in all strings within the list (including d ...
分类:
其他好文 时间:
2020-01-18 13:04:21
阅读次数:
99
Given a string, find the length of the longest substring without repeating characters. Example 1: Input: "abcabcbb" Output: 3 Explanation: The answer ...
分类:
其他好文 时间:
2020-01-17 15:08:09
阅读次数:
93
"?? ????" 题意:价值 = 区间和 × 区间最小值,求数组的子区间的最大价值 (1) 区间和 前缀和 (2)O(n^2) 枚举区间 O( n ) 枚举元素 ,根据当前元素查询相应区间和 对每个元素,维护他作为最小值的左右端点,枚举数组中的元素,该元素大于0为例,查找( i , r [ i ] ...
分类:
其他好文 时间:
2020-01-17 13:25:11
阅读次数:
58
洗牌算法 洗牌算法,刚在知乎 "这个回答" 上看到的一个算法,非常有趣。 通过概率论的知识原地实现了一个公平的随机算法。 大致的过程就是一个数组(假设有n个数),从后往前取第一个数A,第二个数随机从前面的数据中选取。最后算下来随机的概率是1/n。 代码如下 ...
分类:
编程语言 时间:
2020-01-16 19:03:00
阅读次数:
68
An example of the typical approach to calculating expectaion of product of several random variables. ...
分类:
其他好文 时间:
2020-01-16 12:47:32
阅读次数:
72
作者:刘慰链接:https://www.zhihu.com/question/24696366/answer/29189700 首先要明白”范式(NF)”是什么意思。按照教材中的定义,范式是“符合某一种级别的关系模式的集合,表示一个关系内部各属性之间的联系的合理化程度”。很晦涩吧?实际上你可以把它粗 ...
分类:
数据库 时间:
2020-01-15 14:12:21
阅读次数:
76