How do beginners get started with Python algorithm?
I have learned the basic knowledge of Python. If I want to advance it, let's do some algorithms! after all
Programming language is just a tool, and structural algorithm is the soul.
How do beginners get started with Python algorithm?
Several Indian brothers have established a complete collection of Python algorithms on Git Hub.
. I have explained everything to you from the principle to the code. In order to make novices more intuitive
Yes, some parts are also equipped with animation.
/algorithm /Python
This project mainly includes two parts: one is to explain the basic principles of various algorithms.
Second, the code implementation of various algorithms.
Code implementation of the algorithm
The code implementation of the algorithm also gives a wealth of information, except the basic principle of the algorithm.
Python code, including neural network, machine learning, mathematics and so on.
Realize.
For example, in the neural network part, BP neural network, convolutional neural network, full
Convolutional neural network and perceptron, etc.
The code is saved in Python file format on Git Hub, and students who need it can download it from.
Save and download online.
/algorithm /Python
How do beginners get started with Python algorithm?
Algorithm principle
In the part of algorithm principle, it mainly introduces sorting algorithm, search algorithm, interpolation algorithm,
Jump search algorithm, quick selection algorithm, tabu search algorithm, encryption algorithm, etc.
Of course, in addition to the text description, corresponding help is also given to better understand the algorithm.
Links to resources, including Wikipedia and links to animated interactive websites.
For example, in some algorithm parts, it gives perfect interactive animation links.
It is helpful to understand the operation mechanism of the algorithm.
Interactive animation address:
/developers/sorting algorithms/bub
Boolean sorting
Classification algorithm
bubble sort
How do beginners get started with Python algorithm?
Bubble sorting, sometimes called settling sorting, is a relatively simple sorting calculation.
Law. The algorithm is to traverse the linked list to be sorted and combine two non-adjacent linked lists
Exchange data items that meet the arrangement rules, and then iterate through the list until they don't.
The data items that need to be exchanged appear again. When there is no data item to exchange, it indicates that
The list is sorted.
Bucket sorting algorithm
Bucket sorting or so-called box sorting is an effective sorting algorithm.
The principle of is to divide the array into a limited number of buckets. Each bucket is sorted separately.
You can use other sorting algorithms or continue to recursively use bucket sorting.
Sort it.
Cocktail classification
Cocktail sorting, that is, directional bubble sorting, cocktail mixing sorting and mixed row.
Order (which can also be regarded as a variant of selective sorting), ripple sorting, and back and forth sorting.
Or happy hour sorting, is a variant of bubble sorting. This algorithm and bubble row
The order is different in that it is sorted in two directions in the sequence.
How do beginners get started with Python algorithm?
Insertion sort
Insertion sorting is a simple and intuitive sorting algorithm. its
The working principle is to construct an ordered sequence. For unordered data, the ordered sequence is
Scan from back to front in the column, find the corresponding position and insert it. The insertion sorting is realized.
In-place sorting is usually used to sort redundant space, so it is from back to front.
In the process of tracking, the sorted elements need to be moved backward step by step to become the latest elements.
Provide insertion space.
Combined classification
The Mergesort (mergesort or mergesort) is created in the merge operation _
An efficient sorting algorithm based on is O(n logn) (big O symbol). 1945
It was first proposed by john von neumann in 1920. The algorithm is partitioned.
And each layer can divide and conquer recursively.
meanwhile
Heap; many
Heap is a sort algorithm based on comparison. It can be considered as a kind of
Improved selection sorting. It divides its input into sorted and unsorted regions,
How do beginners get started with Python algorithm?
By extracting the largest element and moving it to the sorting area, disorder is iteratively reduced.
Area.
radix sort
Cardinal sorting is a non-comparative integer sorting algorithm, and its principle is as follows
Is to cut an integer into different numbers according to the number of digits, and then compare them separately according to each digit.
. Because integers can also represent strings (such as names or dates) and specific formats.
Floating-point numbers, so cardinal sorting is not only applicable to integers.
Selective sorting method
Selective sorting is a simple and intuitive sorting algorithm. its
The working principle is as follows. First, find the smallest (largest) element in the unordered sequence and save it.
Put it at the beginning of the sorted sequence, and then continue from the remaining unsorted elements.
Find the smallest (largest) element and put it at the end of the sorting sequence. etc
Until all elements are sorted.
Shell classification
Shell sorting is an extension of insert sorting, which allows the exchange of items that are far away. think
A path is a list of arranged elements, so as to start from anywhere and consider every nth element.
Prime will give you a sorted list. Such a list is called H-sorting. Equivalently, it may
In the so-called H-staggered list, each element is sorted separately.