DFS (Depth First Search)
Depth First Search An algorithm for traversing or searching a tree or graph. Traverse the nodes of the tree along the depth of the tree, searching the branches of the tree as deep as possible. When the edge of node v has been explored or the node does not meet the conditions during the search, the se ...
Posted by dennismcdougall on Sun, 05 Feb 2023 07:28:39 +0300
Other questions to be filled... Link: 2023 Niu Ke Winter Vacation Algorithm Basic Training Camp 5
A Xiaosha の hospitality (greedy, prefix and, two points)
The value of n commodities,
Posted by jasonman1 on Thu, 02 Feb 2023 02:37:43 +0300
A. Come and help Xiaoxin
The meaning of the question is very simple, input two strings, find the second string in the first string, output yes if successful, otherwise output no
But Xiaoxin is sick, he can't distinguish the thr ...
Posted by riddlejk on Sun, 29 Jan 2023 08:52:45 +0300
Echelon sieve / Euler sieve for prime numbers
At the beginning of the beginning, I recommend two videos, uh, my introductory video (let others go elsewhere for the crumbs (bushi) before I start talking)
Little broken station (well, this teacher is very vivid)
Small broken station (actually I am a fan of this teacher...)
Now if you give us a ...
Posted by Eddie Fisher on Wed, 25 Jan 2023 19:41:19 +0300
If you accumulate steps every day, you can reach a thousand miles.
The level is limited, please correct me if there are any deficiencies.
1. What is the output of the following code ( )
The representation range of ...
Posted by LordPsyan on Wed, 25 Jan 2023 10:12:33 +0300
1. Topics for discussion
2. Programming exercises
1. Conduct a random experiment to test the difference between the sequential search algorithm and the binary search algorithm when processing lists of integers.
The binary search algorithm can only search ordered lists, and the sequential search algorithm can search both unorde ...
Posted by trawets on Fri, 20 Jan 2023 16:01:06 +0300
1. Implementation idea of fruit fly optimization algorithm
Fruit Fly Optimization Algorithm (FOA) is a swarm intelligence optimization algorithm proposed by Pan Wenchao in 2011. It simulates the way fruit flies in nature forage, and compares the position information of food to the optimal solution of optimization problems. The optimal soluti ...
Posted by krysco on Fri, 20 Jan 2023 04:38:33 +0300
24. Exchange the nodes in the linked list two by two
Topic link: 24. Exchange Nodes in Linked List - Leetcode
None, but can't think of a recursive method
1. Iterative method
After understanding the meaning of the question, it can be simply understood as the exchange of several numbers. Due to the speci ...
1. Write in front
In the front, we have learned the principle of parallel full sorting algorithm and double tone sorting algorithm and the writing of RTL code. In this article, we will continue to learn the classic sorting algorithm - bubble sorting algorithm, learn its principle and its Verilog implementation .
2. The principle of bubb ...
Posted by tryin_to_learn on Sun, 15 Jan 2023 15:02:24 +0300
A1&A2 Gardener and the Capybaras
Simple version: A1 Hard version: A2 A string contains only two letters a and b. Please divide this string into three non-empty strings so that the lexicographical order of the second string is the largest or the smallest. The data range of the hard version requires that the problem be solved ...
Posted by cbullock on Thu, 12 Jan 2023 20:11:38 +0300