D * algorithm (Dynamic A Star)
D * algorithm (Dynamic A Star)
Symbol and function description
Openlist is a tool that can be used to do Breadth first search Queue of
The identification tag s of node state are divided into three categories: those that have not joined the open table (new), those in the open table (open), and those that have been in the open table but have b ...
Added by Usagi on Mon, 07 Mar 2022 09:59:31 +0200
CSP-202112-3-boarding pass
reference resources
Reference problem solution 1 The blogger above actually said it very carefully. Maybe the polynomial is a little obscure, but after understanding it, I found that the blogger did say it in detail.
calculation
g
(
x
)
...
Added by beefy23 on Mon, 07 Mar 2022 04:52:16 +0200
Algorithm_ Greedy algorithm_ The best time to buy and sell stocks II
The best time to buy and sell stocks II
leetcode link
1. Solution
Solution 1
First of all, the first idea is to find a relatively low share price to buy, and then find a relatively high share price to sell, and then repeat. Therefore, the current problem is how to determine the position of relatively low stock price and relatively high ...
Added by j_70 on Mon, 07 Mar 2022 03:32:46 +0200
"LeetCode" game 73 biweekly solution
6024. The number that appears most frequently immediately after the key in the array
Code
class Solution {
public:
int mostFrequent(vector<int>& nums, int key) {
int n = nums.size();
int ans = 0;
unordered_map<int, int> mp;
for (int i = 0; i <= n - 2; i++) {
/* Count the numbe ...
Added by MLJJ on Sun, 06 Mar 2022 17:01:08 +0200
ubuntu18.04 installing opencv4 5.5 and opencv contrib4 five point five
Step 1: download the source code package from github
And put opencv and opencv contrib in the same directory At the same time, create a new build folder in this directory
mkdir build
Step 2: install dependency
#Installation tools
sudo apt-get install cmake cmake-qt-gui git unzip
#Installation dependency
sudo apt-get install build-esse ...
Added by ianwest on Sun, 06 Mar 2022 15:44:29 +0200
Application of algorithm training camp graph (topological sorting)
Topological sorting
principle
An acyclic directed graph is called a directed acyclic graph.Directed acyclic graph is an effective tool to describe the process of engineering, planning, production and system. There are usually certain constraints between activities. For example, sequence.A directed graph that uses nodes to represent activities ...
Added by jay7981 on Sun, 06 Mar 2022 15:27:54 +0200
2022-02-13 daily clock in: problem fine brush
2022-02-13 daily clock in: problem fine brush
Write in front
"After being proficient, these things may be as plain as drinking water, but they can bring great happiness to beginners. I always feel that whether we can always maintain the enthusiasm and concentration like beginners determines how far we can go and how good we can do someth ...
Added by mabwi on Sun, 06 Mar 2022 14:49:35 +0200
Insert sort
Insert sort directly: Algorithm idea: 1. The array is divided into two parts: ordered part and unordered part 2. Divide the initial data into ordered parts and unordered parts. In each step, insert the data of an unordered part into the ordered part that has been arranged previously And so on until all elements are sorted Average time complexit ...
Added by hhoeksma on Sun, 06 Mar 2022 13:59:05 +0200
Learning Java multithreading is enough
1, Threads and processes
In programs that do not use multithreading, the program has only one main thread, and our program is top-down according to the code. In multithreaded programs, other threads run simultaneously with the main thread. As shown in the figure: Next, we introduce related concepts Speaking of process, we have to say pro ...
Added by benmay.org on Sun, 06 Mar 2022 09:04:53 +0200
Sorting algorithm sorting
classification
How to judge whether the sorting is stable
Stable: if a is in front of b and a=b, a is still in front of b after sorting. Unstable: if a was originally in front of b and a=b, a may appear after b after sorting.
1. Bubble sorting
Algorithm process: Compare adjacent elements. If the first one is bigger than the second, exchan ...
Added by TheoGB on Sun, 06 Mar 2022 07:54:41 +0200