Basic Graph Theory and Search

DFS (Depth First Search) basic concept 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

2023 Niuke Winter Vacation Algorithm Basic Training Camp 5 (Pass A, B, C, D, H, I, K, L) The meaning of the question I is too obscure, so I will update it tomorrow.

Other questions to be filled... Link: 2023 Niu Ke Winter Vacation Algorithm Basic Training Camp 5 simple question A Xiaosha の hospitality (greedy, prefix and, two points) Meaning way given n n The value of n commodities, q ...

Posted by jasonman1 on Thu, 02 Feb 2023 02:37:43 +0300

Shenyang University of Chemical Technology & Qufu Normal University Joint Monthly Competition in January

A . A. 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

Eulerian sieve, Euler sieve (number theory)

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

[Winter vacation practice] day1

foreword If you accumulate steps every day, you can reach a thousand miles. The level is limited, please correct me if there are any deficiencies. multiple choice 1. What is the output of the following code ( ) char a=101; int sum=200; a+=27; sum+=a; printf("%d\n",sum); A:327 B:99 C:328 D:72 analyze The representation range of ...

Posted by LordPsyan on Wed, 25 Jan 2023 10:12:33 +0300

Python Data Structure and Algorithm Analysis Exercises__chapter5

1. Topics for discussion slightly. 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

Implementation of the Fruit Fly Optimization Algorithm (FOA) (Python with source code)

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

Code Random Recording Algorithm Training Camp Day4 | | 24. Exchange nodes in the linked list in pairs, 19. Delete the last N node of the linked list, interview questions 02.07. Linked list intersection, 142. Ring linked list II

24. Exchange the nodes in the linked list two by two Topic link: 24. Exchange Nodes in Linked List - Leetcode encountered difficulties None, but can't think of a recursive method answer 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 ...

Posted by mwaw on Sun, 15 Jan 2023 21:28:14 +0300

FPGA Design Bubble Sort

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

Codeforces Round #843 (Div. 2) A ~ C Solution

A1&A2 Gardener and the Capybaras Title meaning 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