一、题目 1、审题 2、分析 判断一个数组中是否有重复的元素 二、解答 1、思路: 方法一、 先排序,在判断 方法二、 使用优先队列 PriorityQueue 对数组进行排序 方法三、 使用选择排序对数组进行排序,在判断。 注意: 为了提高选择排序的效率(即避免基本有序时的最坏情况),可以先对数组 ...
分类:
其他好文 时间:
2018-11-03 22:02:47
阅读次数:
147
一、题目 1、审题 2、分析 判断数组中是否存在两个值相同的元素,下标之差 <= k 二、解答 1、思路: 使用 Set 将数组的前 k 个元素添加入 Set,若有添加失败情况,则返回 true; 之后每次将 set 中的前面第 i - k - 1 个元素从 Set 中去除,并添加入新的元素,若添加 ...
分类:
其他好文 时间:
2018-11-03 21:53:56
阅读次数:
198
https://www.devexpress.com/Support/Center/Question/Details/A385/how-to-iterate-through-all-gridview-records-in-their-display-order-irrespective-of-gro ...
分类:
其他好文 时间:
2018-11-03 20:19:25
阅读次数:
412
https://www.sitepoint.com/how-to-create-mysql-triggers/ I created two tables: I created three triggers: first, I insert some records: second, I update ...
分类:
数据库 时间:
2018-11-03 12:40:47
阅读次数:
178
176. Second Highest Salary KEYWORD LIST : Specify the number of records to return in the result set : Returns all rows from the left table, and the ma ...
分类:
数据库 时间:
2018-11-01 11:59:14
阅读次数:
390
先看一个sql语句: select * from admin where username='(此处为用户输入的数据)'; 在没有任何过滤的情况下,如果用户输入:' or 1=1 -- 这条语句就为:select * from admin where username='' or 1=1 --'; ...
分类:
数据库 时间:
2018-10-31 00:02:42
阅读次数:
179
1 #include 2 3 bool duplicate(int numbers[], int length, int* duplication) 4 { 5 if (numbers == nullptr || length length - 1) 10 return false; 11 12 }... ...
分类:
其他好文 时间:
2018-10-27 23:36:04
阅读次数:
297
InfluxDB是一个开源的时序数据库,使用GO语言开发,特别适合用于处理和分析资源监控数据这种时序相关数据。而InfluxDB自带的各种特殊函数如求标准差,随机取样数据,统计数据变化比等,使数据统计和实时分析变得十分方便。在我们的容器资源监控系统中,就采用了InfluxDB存储cadvisor的监 ...
分类:
数据库 时间:
2018-10-27 17:11:10
阅读次数:
446
Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list. Example 1: Example 2: ...
分类:
其他好文 时间:
2018-10-24 20:00:48
阅读次数:
157
Given a set of distinct integers, nums, return all possible subsets (the power set). Note: The solution set must not contain duplicate subsets. Exampl ...
分类:
其他好文 时间:
2018-10-24 16:06:20
阅读次数:
175