## Data structure – sorting algorithm – counting sort

Counting sort is a sorting algorithm with a time complexity of O(n), which was proposed by Harold H. Seward in 1954. When sorting a range of integers, its complexity is O(n + k) (where k is the range size of integers). Pseudo counting sort We need to sort an array where each element is an […]

## Image red-eye removal in computer vision algorithms (Red-eye Removal)

Table of Contents 1 Introduction 2. The principle of red-eye phenomenon 3. Principle of image red-eye removal 4. Commonly used methods to remove red-eye from images 4.1 Methods based on color space 4.2 Methods based on shape analysis 4.3 Machine learning-based methods 5. Application and development 6. Summary 1. Introduction In photography, red-eye refers to […]

## Data structure – sorting algorithm – merge sort

Merge two ordered arrays into one ordered array In the process of inserting the second list into the first list one by one, since the second list is already sorted, the subsequently inserted elements will not be before the previously inserted elements. In the process of inserting one by one, each time you insert, you […]

## Merge sort algorithm based on element groups

Problem description What is the merge sort algorithm for element groups? For example: If there is an array [1,2,3,4,5,6,7,8,9], {1,2,3} is a group, { 4,5,6} is a group, {7,8,9} is a group. Now we need to sort according to the first element of each group. The groups need to move together, then the array after […]

## Solve TSP problem based on particle swarm algorithm in C++

Particle swarm optimization algorithm solves TSP traveling salesman problem C++ (2020.11.12)_jing_zhong’s blog-CSDN blog Hybrid Particle Swarm Optimization (PSO): C++ implements TSP problem – Zhihu (zhihu.com) 1. Principle It is another guessing algorithm. It is similar to the genetic algorithm. It also sets the number of iterations, controls when it will end, and then sets the […]

## Design of segmentation algorithm for cerebral hemorrhage CT images based on FCM

Design content and requirements For CT images of cerebral hemorrhage, a segmentation algorithm is designed to automatically extract suspected hematoma areas and estimate the area of bleeding areas. Design requirements: ① Design a segmentation algorithm for CT images of cerebral hemorrhage based on the analysis of CT imaging principles; ② Can realize segmentation and extraction […]

## [Algorithm] Search class – binary search algorithm

Summary of binary search algorithm Algorithm description This algorithm is a search algorithm. When you need to find an element from an ordered array, you can use this algorithm to find it. (This article assumes that the array is in ascending order) Algorithmic Thought Each time a half search is performed, the middle element value […]

## Easy-to-understand encryption and decryption series (3) – “Hash algorithm” big PK

figure 1 After two issues of the encryption and decryption series, let us change the topic in this chapter – “Hash”. Let’s start with the “needs of the information technology world”. When the recipient receives a file from the sender, how can it quickly verify that the file content has not been lost, out of […]

## Level 19 of Algorithm Clearance Village: Silver Challenge-Dynamic Programming High Frequency Problem

Silver Challenge-Dynamic Programming High Frequency Problem 1. Minimum number of coins LeetCode 322 https://leetcode.cn/problems/coin-change/description/ Idea analysis Try using backtracing If coins=[2,5,7], amount=27, during the solution process, each position can be selected from [2,5,7], so all situations can be enumerated step by step, and then the required The minimum number of coins, as shown below: From […]

## Practice and comparative analysis of various data filling algorithms in time series scenarios

In time series modeling tasks, models are often sensitive to missing data. A large amount of missing data may even cause the trained model to be completely unusable. I also wrote about data filling in my previous blog post. I feel If you are interested, you can read it by yourself: “Python implements missing data […]