
算法
文章平均质量分 51
stary_yan
"I believe people express their appreciation to the rest of humanity is to make something wonderful and put it out there."
展开
-
[算法]详解关键路径算法
详解关键路径算法#include <iostream>#include <vector>using namespace std;int eventsSize, activitiesSize;int activitiesCostTimes[100][100];pair<int, int> activities[100];int eventEarlyBegin[100], eventLate原创 2017-01-09 10:20:22 · 3070 阅读 · 0 评论 -
[算法]AVL树
#include <iostream>using namespace std;struct TreeNode { int key; int height{0}; TreeNode* left, * right; TreeNode(int tKey = 0, TreeNode* tLeft = nullptr, TreeNode* tRigh原创 2017-01-09 19:56:24 · 385 阅读 · 0 评论 -
[算法]二叉堆
#include <iostream>using namespace std;#define MAXSIZE 100class BinaryHeap {private: int values[MAXSIZE]; int size{0}; bool cmp(int left, int right) { return left < right; }原创 2017-01-09 20:44:10 · 448 阅读 · 0 评论 -
[Leetcode]Dynamic Programming
[Leetcode]Dynamic ProgrammingRegular Expression MatchingAnalysisIt is easy to understand the problem. What we need to do is to find if the string can be matched by the pattern. At first, I think it wil原创 2017-12-02 12:44:34 · 373 阅读 · 0 评论 -
NP-Complete Question
NP-Complete Question Prove that the following problem is NP-complete: given an undirected graph G = (V, E) and an integer k, return a clique of size k as well as an independent set of size k, provide原创 2017-12-31 22:18:20 · 392 阅读 · 0 评论