摘要:
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 阅读全文
摘要:
Official document "Using Redis as an LRU cache" Eviction policies There are total 6 evicition policies so far: noeviction allkeys lru allkeys random v 阅读全文
摘要:
Links https://www.renfei.org/blog/bipartite-matching.html https://en.wikipedia.org/wiki/Matching_(graph_theory) Hungarian Algorithm Given a matching M 阅读全文
摘要:
HDU 1164 #include <bits/stdc++.h> #define DBG(x) cerr << #x << " = " << x << endl using namespace std; typedef long long LL; const int MAXN = 65535 + 阅读全文
摘要:
Implementation #include <bits/stdc++.h> #define DBG(x) cerr << #x << " = " << x << endl using namespace std; typedef long long LL; void qsort(vector<i 阅读全文
摘要:
Stars Two dimensional binary indexed tree. #include <bits/stdc++.h> #define DBG(x) cerr << #x << " = " << x << endl using namespace std; typedef long 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
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) 阅读全文
摘要:
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 阅读全文