Given two binary search trees, return True if and only if there is a node in the first tree and a node in the second tree whose values sum up to a giv ...
分类:
其他好文 时间:
2020-04-27 13:22:13
阅读次数:
61
欧几里得距离: $n$ 维空间的表示就是 $$\sqrt{\sum\limits^{n}_ {i=1} (ax_i ay_i)^2}$$ 感觉好装的样子…… 曼哈顿距离 $$\sum\limits_{i=1}^{n} |ax_i ay_i|$$ 还是感觉好装的样子 切比雪夫距离 $$\max\lim ...
分类:
其他好文 时间:
2020-04-27 09:58:05
阅读次数:
59
功能:自定义视频播放器中的时间戳控件。 ` ` ...
分类:
其他好文 时间:
2020-04-26 22:30:27
阅读次数:
79
原子类AtomicInteger的ABA问题 连环套路 从AtomicInteger引出下面的问题 CAS Unsafe CAS底层思想 ABA 原子引用更新 如何规避ABA问题 ABA问题是什么 狸猫换太子 假设现在有两个线程,分别是T1 和 T2,然后T1执行某个操作的时间为10秒,T2执行某个 ...
分类:
其他好文 时间:
2020-04-25 19:23:27
阅读次数:
80
1.MIPS(Million Instructions Per Second):单字长定点指令平均执行速度 Million Instructions Per Second的缩写,每秒处理的百万级的机器语言指令数。 存在的问题: MIPS是指令执行的速率,规定了性能和执行时间成反比,越快的计算机具有越 ...
分类:
其他好文 时间:
2020-04-25 17:30:47
阅读次数:
313
题目: 视频游戏“辐射4”中,任务“通向自由”要求玩家到达名为“Freedom Trail Ring”的金属表盘,并使用表盘拼写特定关键词才能开门。 给定一个字符串 ring,表示刻在外环上的编码;给定另一个字符串 key,表示需要拼写的关键词。您需要算出能够拼写关键词中所有字符的最少步数。 最初, ...
分类:
其他好文 时间:
2020-04-24 21:34:59
阅读次数:
90
(一)概述 在日常的MySQL数据库运维过程中,可能会遇到用户误删除数据,常见的误删除数据操作有: 用户执行delete,因为条件不对,删除了不应该删除的数据(DML操作); 用户执行update,因为条件不对,更新数据出错(DML操作); 用户误删除表drop table(DDL操作); 用户误清 ...
分类:
数据库 时间:
2020-04-23 23:03:41
阅读次数:
73
1 class Solution 2 { 3 public: 4 vector<int> topKFrequent(vector<int>& nums, int k) 5 { 6 vector<int> res; 7 unordered_map<int,int> hash; 8 for(auto a ...
分类:
其他好文 时间:
2020-04-22 19:38:30
阅读次数:
43
time.time() 返回当前时间的时间戳 time.localtime() 接收时间戳(1970纪元后经过的浮点秒数)并返回当地时间下的时间元组t time.strftime() 接收以时间元组,并返回以可读字符串表示的当地时间 time.strptime() 根据fmt的格式把一个时间字符串解 ...
分类:
其他好文 时间:
2020-04-22 00:09:38
阅读次数:
67
Mysql时间加减函数为date_add()、date_sub() 定义和用法DATE_ADD() 函数向日期添加指定的时间间隔。DATE_SUB() 函数向日期减少指定的时间间隔。语法DATE_ADD(date,INTERVAL expr type)DATE_SUB(date,INTERVAL e ...
分类:
数据库 时间:
2020-04-21 15:32:39
阅读次数:
371