Introduction to bubble sorting and sorting of two-dimensional arrays
1. Brief introduction of bubble sorting
Bubble Sort, also known as Bubble Sort, is a simple sorting algorithm. It repeatedly visits the columns to be sorted, compares two elements at a time, and exchanges them if they are in the wrong order. The work of visiting a number of columns is repeated until no exchanges are needed, that is, the ...
Posted by coder500 on Mon, 21 Feb 2022 18:38:40 +0100
[advanced pointer application (Simulated Implementation of qsort sorting function)]
preface:
🐱 🏍 Ha ha, I'm very glad that you have entered my series of articles on pointer learning. I believe that in the process of learning pointer, most of your little partners must not be plain sailing. Once you learn it, you know that there may be a stagnation in one of these links. I think so as a Xiaobai, but no matter what, y ...
Posted by epimeth on Mon, 21 Feb 2022 15:14:22 +0100
Chessboard coverage (C + + | divide and conquer | recursion)
Title Description
Description
Chessboard coverage problem: given a chessboard with a size of 2^n2^n small squares, one of the positions has been filled. Now we need to cover the remaining small squares with an L-shape (remove one of the small squares from the large squares composed of 22 small squares). Find out the covering scheme, th ...
Posted by bogeyman on Mon, 21 Feb 2022 14:50:08 +0100
Simple understanding of sorting algorithm
Before carrying out many convenient algorithms, it is always necessary to realize the ordering of objects, which will use the sorting related algorithms. Even though many high-level languages have completed the encapsulation of the sorting algorithm, users only need to import the corresponding library file to call the sorting algorithm to compl ...
Posted by texerasmo on Mon, 21 Feb 2022 14:23:38 +0100
Deep learning notes of vegetables | theory and Implementation Based on Python
Series index:
Chapter 1 Python Basics
(1) Python Libraries - numpy, matplotlib
Here is an example to understand the use of two important Python libraries.
import numpy as np
import matplotlib.pyplot as plt
x = np.arange(0, 6, 0.1)
y1 = np.sin(x)
y2 = np.cos(x)
plt.plot(x, y1, label="sin")
plt.plot(x, y2, linestyle="--", label ...
Posted by modulor on Mon, 21 Feb 2022 13:30:15 +0100
Study notes Day 46 (making score cards by logistic regression)
api import:
import pandas as pd
import numpy as np
from sklearn.linear_model import LogisticRegression as LR
Data acquisition:
df = pd.read_csv('./Data/rankingcard.csv',index_col=0)
Remove duplicates:
When you manually enter or enter more than one line, duplicate data is likely to appear. You need to remove the duplicate values first,
# ...
Posted by vig0 on Mon, 21 Feb 2022 13:01:06 +0100
2022-02-21 swipe questions and punch in every day
1, Informatics OJ: 1281: Longest ascending subsequence
(1) Problem description
A number sequence bibi, when B1 < B2 << bSb1<b2<...< BS, we call this sequence rising. For a given sequence (a1,a2,...,aN)(a1,a2,...,aN), we can get some ascending subsequences (ai1,ai2,...,aiK)(ai1,ai2,...,aiK), where 1 ≤ I1 < ...
Posted by phpfreakjav on Mon, 21 Feb 2022 12:44:25 +0100
Chapter II linearity table
1, Definition (logical structure) and basic operation (operation) of linear table
Definition: a linear table is a finite sequence of n (n > = 0) data elements with the same data type, where n is the table length. When n = 0, the linear table is an empty table. If L is used to name the linear table, it is generally expressed as L = (a1 , a2 ...
Posted by elgordo1960 on Mon, 21 Feb 2022 11:50:09 +0100
Machine learning Sklearn summary 2 - Classification Algorithm
catalogue
1, Converter and estimator
2, Classification algorithm
K-nearest neighbor algorithm
Case code:
Model selection and tuning
Case code:
Naive Bayesian algorithm:
Summary of naive Bayesian algorithm
Case code:
Decision tree summary:
Case code:
Use random forest to achieve:
Random forest summary
summary
Code set of this ca ...
Posted by irkevin on Mon, 21 Feb 2022 09:38:40 +0100
[code Capriccio] Chapter 10 greedy algorithm
Chapter 10 greedy algorithm
Greed has no fixed template routine
If we can find out the local optimum and deduce the global optimum, it is greedy; If the local optimum is not found, it is not greedy, but may be a simple simulation.
Greedy algorithm is generally divided into the following four steps:
The problem is decomposed into several sub ...
Posted by aaaaCHoooo on Mon, 21 Feb 2022 09:23:53 +0100