![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Algorithm Study Note
This column is to summary some knowledge of the algorithm problem.
LingzeHu2020
这个作者很懒,什么都没留下…
展开
-
12. Advanced Data Structure(with example problems)
0. OverviewThis time we will discuss some helpful data structures in algorithm. In many times, a good data structure could save us lots of energy, thus, besides the basic data structure vector, stack...原创 2020-06-18 08:05:39 · 460 阅读 · 0 评论 -
7. OOP: Hash Table, Map, Priority Queue
Hash Table, Map, Priority Queue0. OverviewBesides the basic data structures mentioned in STL, there are some other interesting data structure worth being mentioned.1. Hash Table vs. Hash MapHash t...原创 2020-04-28 00:25:14 · 195 阅读 · 0 评论 -
6. OOP: Callable Function
Callable Function0. OverviewIt could happens sometimes that we need to pass a function as parameter to another function. However, it is weird to pass a function directly. Thus, this time we will cov...原创 2020-04-26 05:37:38 · 226 阅读 · 0 评论 -
11. Two Pointers(with example problems)
0. Basic Concepts0.1 Two Pointers Type?Same direction pointersFace-to-face directions1. Problem Type:1.1 Same direction pointers1.1.1 Examples:604. Window Sum vector<int> winSum(vec...原创 2020-04-24 10:05:47 · 228 阅读 · 0 评论 -
2. Linked List(with example problems)
Tools: Dummy NodeWhen to use:When it related to the head node, and the head node is uncertain.Tips:a. If a node->next is effected, then we need to correct this pointer.b. If the node to be d...原创 2020-04-20 00:26:00 · 306 阅读 · 0 评论 -
10. Depth First Search(with example problems)
0. Basic Concepts0.1 When to use DFS?When a problem need you to return all possible solutions, which can be permutation or combination, it is a must to use DFS.Time Complexity: O( # of solutions * ...原创 2020-04-15 12:48:35 · 154 阅读 · 0 评论 -
9. Breath First Search(with problem example)
0. Basic Concepts0.1 When to use BFS?Traversal in GraphLevel Order TraversalConnected ComponentTopological SortingShortest Path in Simple GraphLimited to the simple graph, which means no ...原创 2020-04-15 01:03:17 · 296 阅读 · 0 评论 -
4.Binary Tree(with example problem)
0. Basic Concepts0.1 Binary TreeAt the depth of i, the number of nodes is 2^(i-1) at most.For a tree whose depth is k, the number of nodes is 2^(k-1) at most0.2 Full Binary TreeThe binary tree ...原创 2020-04-11 07:14:13 · 351 阅读 · 0 评论 -
8. Binary Search(with example problems)
1. Binary Search ProblemThis kind of problem are usually:Given an sorted integer array - nums, and an integer - target.Find the any/first/last position of target in numsReturn -1 if target does n...原创 2020-04-01 05:01:41 · 270 阅读 · 0 评论 -
1.Array & String (with example problems)
Array & String加粗样式Tools: string functions in C++These functions are frequently used in algorithm solution, for more details and functions, refer to this.// Searches the string for the first oc...原创 2020-02-18 07:26:24 · 177 阅读 · 0 评论