#Does the string on the fourth day of C language practice contain supplementary questions
Does the string on the fourth day of C language practice contain supplementary questions
Title Description: Suppose there is A string A composed of various letters and another string B. the number of letters of B in the string is relatively small. What is the fastest way to find all the letters in small string B in large string A?
For ...
Posted by filch on Wed, 09 Feb 2022 17:41:33 +0100
Dynamic programming (knapsack problem)
A - upper step 2
Xiaogua wants to go up a total of N steps. Due to the special leg length of xiaogua, he can only go up 1 or 3 or 5 steps at a time. Xiaogua wants to know how many ways he can get up these n steps. Can you help him?
Input An integer n (n < = 100000) in a row indicates that there are n steps in total. Output An integer i ...
Posted by cupboy on Wed, 09 Feb 2022 16:34:44 +0100
Nine sorting algorithms (implemented in Python language)
Article content
1, Selective sorting method
Selective sorting is to repeatedly take out the smallest (or largest) data from the unordered sequence and store it at the beginning of the sequence, and then continue to find the smallest (or largest) data from the unordered elements and store it at the end of the sorted sequence. The final re ...
Posted by nostradamus on Wed, 09 Feb 2022 09:29:15 +0100
Depth first search - maze problem (jisuanke - Blue Bridge Cup national competition training camp)
Depth first search maze problem
Video learning link: https://www.bilibili.com/video/BV1pk4y1z76B Depth first search: referred to as dfs, is a classic search algorithm.
Recursive review
We have studied recursion before. We have implemented some algorithms using recursion:
# 1. Recursive factorial
# n! = 1*2*3*4******n
def factorial(n):
...
Posted by leap500 on Wed, 09 Feb 2022 08:09:01 +0100
[algorithm competition learning] academic frontier trend - paper code statistics
Task 3: thesis code statistics
3.1 task description
Task topic: thesis code statistics, statistics related to the codes in all papers;Task content: use regular expressions to count code connections, pages and chart data;Task achievement: learn regular expression statistics;
3.2 data processing steps
In the original arxiv data set, the autho ...
Posted by sunilj20 on Wed, 09 Feb 2022 06:40:29 +0100
Leetcode question brushing record: 1 sum of two numbers (array hash)
Leetcode question brushing record: 1 sum of two numbers (array hash)
Title stem:
Given an integer array nums and an integer target value target, please find the two integers with and as the target value target in the array and return their array subscripts. You can assume that each input will correspond to only one answer. However, the sam ...
Posted by Bullit on Wed, 09 Feb 2022 06:03:33 +0100
NOI 1805: shredder DFS depth first search / map record answer / string to int
subject
Origin link
describe
You are now in charge of designing a new paper shredder. The general shredder cuts the paper into small pieces and becomes difficult to read. The new shredder you designed has the following characteristics:
1. Before each cutting, a target number of shredders should be given first, and a number should also be in ...
Posted by CoderGoblin on Wed, 09 Feb 2022 04:20:52 +0100
The integer power of the offer 16 value of the sword finger
Realize pow(x, n), that is, calculate the N-power function of X (i.e., xn). Library functions should not be used and large numbers should not be considered.
Example 1:
Input: x = 2.00000, n = 10 Output: 1024.00000
Example 2:
Input: x = 2.10000, n = 3 Output: 9.26100
Example 3:
Input: x = 2.00000, n = -2 Output: 0.25000 Explanation: 2-2 = ...
Posted by Aethaellyn on Tue, 08 Feb 2022 23:06:07 +0100
Anaconda installation and use
Anaconda installation
1.1 download installation files
1) If you want to download directly to the local server and upload to the remote server through ftp, please ignore the following operations
2) If the server is networked, you can directly download the server through wget command [centos version], as follows:
The linux system I use is cen ...
Posted by hiasl on Tue, 08 Feb 2022 22:58:35 +0100
AVL tree and red black tree
AVL tree
concept
Background: Although the binary search tree can shorten the search efficiency, if the data is orderly or close to orderly, the binary search tree will degenerate into a single tree, and the search elements are equivalent to searching elements in the sequence table, which is inefficient, Therefore, two Russian mathematicians G ...
Posted by ghostrider1 on Tue, 08 Feb 2022 22:28:37 +0100