Tag：Sort

Time：20211025
origin Recently read < < my first algorithm book > > ([Japan] Ishida Baohui; Miyazaki Xiuyi)This series of notes is intended to use golang exercises Heap sort Heap sorting is characterized by the use of the heap in the data structure. First, store all the data in the heap and build the heap in descending […]

Time：20211023
1、 Some basic operation functions of array about key name and value1. Get all keys or values of the array:array_keys() array_values() $arr_keys = array_keys($array);$arr_values = array_values($arr); 2. Exchange the positions of keys and values in the array. If the previous ones are repeated, they will be overwritten by the following ones:array_flip() $arr2 = array_flip($arr); 3. […]

Time：20211023
Introduction:This paper introduces some practices of qunar data platform using Flink + iceberg 0.11. Author: Yu Dong Summary:This paper introduces some practices of qunar data platform using Flink + iceberg 0.11. The contents include: Background and pain points Iceberg architecture Pain point 1: Kafka data loss Pain point 2: high pressure of hive in near […]

Time：20211023
First come, first served Short process first algorithm Priority scheduling (preemption) Priority scheduling #include <iostream> #include <cstdio> #include <vector> #include <algorithm> using namespace std; struct PCB { int id; // Process ID double turnaround_ time; // Turnaround time double weighted_ turnaround_ time; // Weighted turnaround time double wait_ time; // waiting time double start_ time; […]

Time：20211022
On the first day of learning algorithms, you were learning bubble and bucket row When you haven’t figured out fast platoon and merge You have learned the final heap sorting and Hill sorting of data structures It can be said that ranking is a nightmare for many competition students So it was born void std::sort() […]

Time：20211022
origin Recently read < < my first algorithm book > > ([Japan] Ishida Baohui; Miyazaki Xiuyi)This series of notes is intended to use golang exercises Merge sort The merge sort algorithm divides the sequence into two subsequences with the same length, When it is impossible to further divide (that is, there is only one data […]

Time：20211022
Write in front Sorting is the two most important concepts in search algorithm. We are searching and sorting in most cases. Scientists have made every effort to make sorting and searching faster. This article uses Python to implement the top ten sorting algorithms. Dry goods Sorting algorithms can be divided into many categories from different […]

Time：20211022
Source of this articleMySQL ranking function implementationReprint, please indicate the source Now there is a need to rank all students’ scores and list their ranking. Just seeing this demand, I was a little confused and had no ideas at all. Why wouldn’t I do it if it was more difficult? Go online to query information, […]

Time：20211020
A go implementation of selective sorting package main import “fmt” //The core of selective sorting is to exchange the maximum or minimum values of the following len (ARR) – n elements in the array with the nth element for the nth time func selectSort(arr *[5]int){ for j := 0; j < len(arr) – 1; J […]

Time：20211019
origin Recently read < < my first algorithm book > > ([Japan] Ishida Baohui; Miyazaki Xiuyi)This series of notes is intended to use golang exercises Quick sort The quick sort algorithm will first randomly select a reference value (pivot) in the sequence, Then the number other than the reference value, It is divided into two […]

Time：20211019
A go implementation of insertion sorting package main import “fmt” //Insert sort is an efficient sort algorithm second only to quick sort. Insert sort is an internal sort (memory) like bubble sort and selection sort //Unlike the other two, insert sort inserts unordered into an ordered array, so it is different from the other two […]

Time：20211018
Quick sort is a sort algorithm with high efficiency. Its idea is mainly recursion package main import “fmt” func QuickSort(left int, right int, arr *[6]int) { l := left r := right pivot := arr[(left + right) / 2] for ; l < r; { for ; arr[l] < pivot; { l++ } for ; […]