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
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
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
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
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
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 ...
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
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
Exercises are selected from: C++ Primer Plus (Sixth Edition) The content is for reference only, please correct me if there is any mistake!
Smart pointer template class
review questions
1. Consider the following class declaration:
class RQ1
{
private:
char * st; // points to C-style string
public:
RQ1() { st = new char [1]; ...
Posted by mike0193 on Tue, 10 Jan 2023 08:07:29 +0300
LeetCode | 977. Squaring an Ordered Array
topic:
Given an array of integers nums sorted in non-decreasing order, return a new array consisting of the square of each number, also sorted in non-decreasing order.
977. Squaring an Ordered Arrayhttps://leetcode.cn/problems/squares-of-a-sorted-array/
think:
When I first thought about the solutio ...