摘要:The latest article from InterviewCake is about a very neat & elegant algorithm: Fisher-Yates shuffle algorithm Q: how to shuffle an array - in-place?
阅读全文
随笔分类 - On Textbook
摘要:The code below is for:http://hihocoder.com/problemset/solution/237010With enough comments to understand:#include #include #include #include #include #...
阅读全文
摘要:http://www.cnblogs.com/grenet/p/3145800.htmlBest elaboration on dancing list I found. in Chinese.Traditional backtracing is a heuristic-like procedure...
阅读全文
摘要:Details not refined yet..struct Ret{ Ret(TreeNode *p, Mask rm) : pVal(p), m(rm){} TreeNode *pVal; Mask m;};class Solution {public: Ret lca...
阅读全文
摘要:One TopCoder article introduces a very interesting alternative solution to Longest Common Sequences problem.It is based on this statement (http://comm...
阅读全文
摘要:#include #include #include #include #include #include #include using namespace std;void insertSort(int A[], int cnt, int step = 1){ if (cnt 0 && A...
阅读全文

浙公网安备 33010602011771号