[Leetcode]124. Maximum path sum in binary tree
Title Description
A path is defined as a sequence that starts from any node in the tree and connects along the parent node to the child node to reach any node. The same node can appear at most in a path sequence. Therefore, the path contains at least one node and does not necessarily pass through the root node.
Path sum is the sum of the ...
Added by bhoward3 on Thu, 27 Jan 2022 07:27:55 +0200
Floyd algorithm finds the shortest path from all vertices to other vertices
1, What is Freudian algorithm?
Floyd algorithm, also known as interpolation method, is an algorithm that uses the idea of dynamic programming to find the shortest path between multiple source points in a given weighted graph. It is similar to Dijkstra algorithm. The difference is that Dijkstra algorithm can only calculate the shortest pa ...
Added by anoopd on Thu, 27 Jan 2022 07:23:14 +0200
JavaScript advanced tutorial (advanced functions, closures, regular expressions, ES6 new syntax, new extension methods)
catalogue
Function definition and call
Strict mode
What is strict mode
Turn on strict mode
Changes in strict mode
Higher order function
closure
regular expression
ES6 new syntax
Built in object extensions for ES6
Extension method of Array
Extension method of String
Set data structure
Function definition and call
Functions can b ...
Added by BlackenedSky on Thu, 27 Jan 2022 03:48:00 +0200
Cryptohack Title Record Mathematics Section Lattice WriteUp
Backpack Cryptograph is missing
Mathematics
Lattices
1. Vectors
Basic vector-to-scalar operations
Title:
v = (2,6,3), w = (1,0,0) and u = (7,7,2), calculate 3*(2*v - w) ∙ 2*u.
Calculate directly using sage
sage: v = vector([2,6,3])
sage: w = vector([1,0,0])
sage: u = vector([7,7,2])
sage: 3*(2*v-w)*2*u
702
flag is 702
2. Size ...
Added by ryan-uk on Thu, 27 Jan 2022 00:03:13 +0200
Meisai 5: evaluation models, interpolation and fitting models (top ten models)
catalogue
1, Evaluation model
1.AHP (analytic hierarchy process)
2.TOPSIS method (good and bad solution distance method)
2, Interpolation and fitting model
1. Interpolation algorithm
2. Fitting algorithm (cftool toolbox)
1, Evaluation model
1.AHP (analytic hierarchy process)
The most basic evaluation model solves evaluation problems ...
Added by raj86 on Wed, 26 Jan 2022 23:56:48 +0200
[Leetcode] 105. Constructing Binary Trees from Pre-order and Medium-order Traversal Sequences
Title Description
Given a tree, preorder and inorder are traversed sequentially. Please construct a binary tree and return its root node.
Example 1
Input: preorder = [3,9,20,15,7], inorder=[9,3,15,20,7]
output:[3,9,20,null,null,15,7]
Example 2
Input: preorder=[-1], inorder=[-1]
output: [-1]
Tips
...
Added by tHud on Wed, 26 Jan 2022 22:50:59 +0200
[algorithm analysis] 7 String search
catalogue
String matching problem:
Analysis of simple matching algorithm:
7.2 Rabin Karp algorithm
Fingerprint based algorithm:
Using the Hash function
Preprocessing: find fingerprint
Step: the key is the calculation of each shift
Rabin Karp algorithm:
analysis:
Application:
KMP algorithm
Automata search
Prefix function:
Prefi ...
Added by fpbaum on Wed, 26 Jan 2022 22:32:54 +0200
Basic algorithm counting method
catalogue
1,LeetCode——1748. Sum of unique elements
2,LeetCode——387. The first unique character in the string
3,LeetCode——1941. Check that all characters appear the same number of times
4,LeetCode——448. Find all missing numbers in the array
5,LeetCode——1512. Number of go ...
Added by west4me on Wed, 26 Jan 2022 20:37:33 +0200
On the new method of multi-point evaluation of polynomials based on transpose principle (attach simple but large constant code)
preface
Recently, I encountered the problem of multi-point evaluation, but I haven't learned the classical polynomial modular version, so I learned the new method directly.
This new method is actually very easy to understand, but it still took me too long (I'm a vegetable)
as paper As mentioned in, the code of this practice is very simple an ...
Added by biltong on Wed, 26 Jan 2022 19:40:09 +0200
HashedWheelTimer usage and source code analysis
HashedWheelTimer introduced in this article is a tool class from Netty, which is in the Netty common package. It is used to implement delayed tasks. In addition, the content described below has nothing to do with Netty.
If you have seen Dubbo's source code, you will see it in many places. It is a very convenient and easy-to-use tool in the sce ...
Added by yarons on Wed, 26 Jan 2022 18:25:05 +0200