Algorithm small point collection

//动态规划---------------------------------------------------------------------------
  1. Permutations and combinations of the separator method , additional dynamic programming may be used .
  2. One-dimensional recursive dynamic programming requires optimization of time complexity .
  3. The definition of stock status array, the relationship between holding and not holding income, and the definition of state transition equation .
  4. Binary-related dynamic programming (of course, this problem can also be solved violently) .
  5. The best-understood example of state transition, in dynamic programming according to which state to write the state transition equation is very critical .
  6. Bellman-Ford algorithm application (compare Dijkstra algorithm) .
  7. Class 0/1 knapsack problem, learn to identify and transform (the principle of solving the dp array backwards: fill it up step by step) .
  8. For knapsack-like problems, the key to recognition is to first use mathematical relations to convert to the corresponding knapsack filling pattern .
  9. Both sides consider the dynamic programming problem of optimal solution at the same time, and understand the essence of space optimization .
  10. Completely knapsack problem . -------- There are two cases about the complete knapsack problem: the method of finding the number of combinations and the number of permutations . ( Number of combinations ) ( Number of permutations )
  11. Interval sum and dynamic programming .
  12. The use of monotonic stacks ; ( the sum of consecutive 1s and the use of monotonic stacks ).
  13. The sum of consecutive 1s (counting the number of rectangles) .
  14. Combination knapsack problem .
  15. Solve the length of the longest Fibonacci sequence and learn to hash a two-dimensional array to one dimension .
//图论---------------------------------------------------------------------------
  1. Determine that the B-tree is a substructure of the A-tree .
  2. Delete the specified tree node and return to the forest. .
    Note that this method uses .count(para) of unordered_set to check whether the element is in the set.

Guess you like

Origin blog.csdn.net/qq_43078427/article/details/114535532