摘要: Definitions https://morsmachine.dk/go scheduler An OS thread, which is the thread of execution managed by the OS and works pretty much like your stand 阅读全文
posted @ 2020-04-17 15:48 ToRapture 阅读(90) 评论(0) 推荐(0) 编辑
摘要: Official document "Using Redis as an LRU cache" Eviction policies There are total 6 evicition policies so far: noeviction allkeys lru allkeys random v 阅读全文
posted @ 2020-04-16 13:47 ToRapture 阅读(179) 评论(0) 推荐(0) 编辑
摘要: Links https://www.renfei.org/blog/bipartite-matching.html https://en.wikipedia.org/wiki/Matching_(graph_theory) Hungarian Algorithm Given a matching M 阅读全文
posted @ 2020-04-14 14:04 ToRapture 阅读(250) 评论(0) 推荐(0) 编辑
摘要: HDU 1164 #include <bits/stdc++.h> #define DBG(x) cerr << #x << " = " << x << endl using namespace std; typedef long long LL; const int MAXN = 65535 + 阅读全文
posted @ 2020-04-13 14:25 ToRapture 阅读(113) 评论(0) 推荐(0) 编辑
摘要: Implementation #include <bits/stdc++.h> #define DBG(x) cerr << #x << " = " << x << endl using namespace std; typedef long long LL; void qsort(vector<i 阅读全文
posted @ 2020-04-13 12:01 ToRapture 阅读(123) 评论(0) 推荐(0) 编辑
摘要: Stars Two dimensional binary indexed tree. #include <bits/stdc++.h> #define DBG(x) cerr << #x << " = " << x << endl using namespace std; typedef long 阅读全文
posted @ 2020-04-12 18:50 ToRapture 阅读(102) 评论(0) 推荐(0) 编辑
摘要: 236. Lowest Common Ancestor of a Binary Tree If we can find two subtrees of root such that both of them has target, then root is the LCA of p and q. I 阅读全文
posted @ 2020-04-10 16:51 ToRapture 阅读(103) 评论(0) 推荐(0) 编辑
摘要: Unique Binary Search Trees class Solution { public: int numTrees(int n) { // We consider the position of node n in the tree first. // Because all node 阅读全文
posted @ 2020-04-07 20:02 ToRapture 阅读(77) 评论(0) 推荐(0) 编辑
摘要: 33. Search in Rotated Sorted Array class Solution { public: int search(vector<int>& nums, int target) { int l = 0, r = nums.size() - 1; while (l <= r) 阅读全文
posted @ 2020-04-04 11:05 ToRapture 阅读(87) 评论(0) 推荐(0) 编辑
摘要: Implementation Some details of this implementation borrow from sonyflake. Here using 8 bits to represent time in units of 500ms, 4 bits to represent s 阅读全文
posted @ 2020-04-01 16:52 ToRapture 阅读(148) 评论(0) 推荐(0) 编辑