Data structure & algorithm - inverse Polish four arithmetic

algorithm 1, Algorithm for converting infix expression to suffix expression: 1. Scan a infix expression from left to right. 2. If the operand is read, judge the type of the operand and store the operand in the operand stack 3. If operator is read (1) If the operator is an open parenthesis "(", it is directly stored in the operator st ...

Posted by ScotDiddle on Tue, 01 Feb 2022 07:48:54 +0100

Three traversals of LeetCode 144 145 94 binary tree -- iterative method

Reference article 1 Reference article 2 Idea: Previously, we learned to use recursive method to traverse three kinds of binary trees. This time, we consider using iterative method to traverse and stack. It is recommended to read both reference articles. Among the two reference articles, the first one talks about how to use the iterative metho ...

Posted by amrigo on Tue, 01 Feb 2022 05:47:06 +0100

Comparison of priority queue (heap) and java objects

1, Sequential storage of binary tree Storage mode Use the array to save the binary tree structure, that is, put the binary tree into the array by sequence traversal. Generally, it is only suitable for representing complete binary trees, because incomplete binary trees will waste space. The main use of this method is the representation of the ...

Posted by ChibiGuy on Tue, 01 Feb 2022 03:08:31 +0100

[OpenCV complete routine] 86 Application of frequency domain filtering: fingerprint image processing

[OpenCV complete routine] 86 Application of frequency domain filtering: fingerprint image processing Welcome to pay attention "100 complete OpenCV routines" Series, continuously updating Welcome to pay attention "Python Xiaobai's OpenCV learning course" Series, continuously updating 4. High pass filter in frequency ...

Posted by phpian on Tue, 01 Feb 2022 01:30:48 +0100

❤️ [dynamic graph demonstration of top 10 classic sorting algorithms (c + + version)] ❤️

1, Fundamentals of sorting algorithm 1. Algorithm classification Common sorting algorithms can be divided into two categories: Comparison sort: the relative order between elements is determined by comparison. Because its time complexity cannot exceed O(nlogn), it is also called nonlinear time comparison sort. Non comparison sort: the re ...

Posted by keiron77 on Mon, 31 Jan 2022 21:17:31 +0100

Bipartite graph algorithm

Coloring is used to judge whether a graph is a bipartite graph Bipartite graph: all points in the graph can be divided into two sides, so that all edges are between sets, and there are no edges inside the set Properties used: a graph is a bipartite graph if and only if the graph can be dyadic A graph is a bipartite graph if and only if it do ...

Posted by az_wraith on Mon, 31 Jan 2022 20:22:59 +0100

Binary balanced tree (AVL) of data structure and algorithm

I'm a sophomore. The purpose of writing this article is to make a certain record of my knowledge and technology, and I'm willing to share it with you. Because I'm still young, there are inevitably some mistakes and omissions in the published article. Please forgive me and correct me if you read this article. If you have any questions during rea ...

Posted by Nymphetamine on Mon, 31 Jan 2022 20:09:58 +0100

How to use NodeDialog to implement its own algorithm in NodeModel

Let's first explain a very simple biner. Bin is equidistant, so that the whole range of an attribute is divided into n intervals. Data points with attribute values in the k-th interval are considered to belong to the k-th bin. Therefore, the output is the original table and the box information is attached to each instance (i.e. row). This node ...

Posted by fredfish666 on Mon, 31 Jan 2022 15:34:59 +0100

Rookie brush question (14) [01 knapsack question]

[01 knapsack problem] There are # N items and a backpack with a capacity of # V. Each item can only be used once. The volume of the # i # article is # vi and the value is # wi. Solve which items are loaded into the backpack, so that the total volume of these items does not exceed the backpack capacity, and the total value is the largest. Out ...

Posted by xgrewellx on Mon, 31 Jan 2022 11:56:13 +0100

Implementation of decision tree algorithm by Golang

1, Algorithm Introduction    Decision Tree is a decision analysis method to obtain the probability that the expected value of net present value is greater than or equal to zero, evaluate the project risk and judge its feasibility by forming a Decision Tree on the basis of knowing the occurrence probability of various situations. It i ...

Posted by anler on Mon, 31 Jan 2022 09:13:32 +0100