## Top ten sorting algorithms

catalogue Low B Trio Bubble sorting Select sort Insert sort N B Trio Quick sort Heap sort Merge sort Summary of NB Trio Other sorting Shell Sort Count sort Bucket sorting Cardinality sort Low B Trio Bubble sorting Algorithm steps Compare adjacent elements. If the first one is bigger than t ...

## Magic squares in matrices

source About magic square Magic square is a method of arranging numbers in a square grid so that the sum of numbers on each row, column and diagonal is equal. Magic squares can be divided into complete magic squares, multiplicative magic squares and high-order magic squares. Complete magic square means that the sum of rows, columns, main ...

## Searching binary tree, complete binary tree, full binary tree and balanced binary tree

Judgement search Binary Tree Search Binary Tree: for each node, the left is less than it and the right is greater than it. The result of middle order traversal (left, middle and right) is increasing, which is to search the binary tree. Judge whether the subtree with x as the head is a binary search tree You need to ask the left tree: is t ...

## Concept and understanding of binary search tree (BST) and balanced binary tree (AVL tree)

Typical applications of tree Binary search tree Static search: the elements of the set are fixed when searching. The main operation on a set is to find instead of delete a mapped operation Method: binary search, ordering the data to be searched in advance Dynamic search: the searched objects will change, and insertion and deletion operation ...

## 30 minutes ~, get the line segment tree structure!!

Note: at present, the number of line segment trees is not much. If there are minor errors in the details, please prove them in the comment area. Thank you! Basic understanding Segment tree is a common data structure, which is essential for acmer algorithm. However, some mainstream textbooks often avoid it, such as introduction to algorithm, ...

## Sorting summary: eight sorting

cataloguecatalogueSequence tableSingle linked list (without additional header node)Double linked list (with additional header node)Stack (sequential table implementation)Queue (chained, without additional header nodes)Binary treeNon recursive traversal of binary treesEight sorts preface There are many sorting in life, such as queuing for e ...

## opengl Advanced Skills

1 glOrtho projection transformation to match uv coordinates How do vertex coordinates and uv texture coordinates of a two-dimensional plane agree without calculation? Use like this glOrtho(0,1,1,0,-1,100); The coordinates that follow can change from negative to consistent with uv //Transfer vertex and texture coordinates //Vertex // static ...

## [training question 69: 2D prefix and + enumeration optimization] Portal | CF#745 Div1: A

meaning of the title Portal | CF#745 Div1: A Given a n × m n\times m n × m 01 01 01 matrix If the l ...

## 6, Agent mode

0. Structural mode Structural patterns describe how classes or objects can be arranged into larger structures. It is divided into class structured pattern and object structured pattern. The former uses inheritance mechanism to organize interfaces and classes, and the latter uses combination or aggregation to combin ...

## Acwing196. Prime distance

Given two integers LL and UU, you need to be in the closed range [L,U][L,U] Find the two adjacent prime numbers with the closest distance C1C1 and C2C2 (i.e C2−C1C2−C1 Is the smallest), if there are other adjacent prime pairs at the same distance, the first pair i ...