Selection sort - selection sort and heap sort

selection sort The basic idea of ​​selection sorting is: each time select the smallest (or largest) element from the data elements to be sorted and store it at the beginning of the sequence until all the data elements to be sorted are exhausted. We can define a begin position to place the minimum value found each time, and another end to p ...

Posted by Jack McSlay on Tue, 21 Mar 2023 12:28:24 +0300

0-1 knapsack problem dp[][]/dp[]

Recommend a video first b station algorithm training camp 1. Type 1, weight limit topic: Given N items, each item has a weight W and a value V. You have a knapsack that can hold M weight. Ask how to pack it so that the value of the item is maximized. There is only one item for each item. enter: The first line of input contains two integ ...

Posted by TimC on Tue, 21 Mar 2023 12:02:10 +0300

C/C++ common console functions

C/C++ common console functionsPreface: Include the header file Windows.h#include<Windows.h>copyIt should be noted that this header file contains the definitions of most win api functions, not just the console apiView all available operations console API function1. Modify and get the titleUse function: SetConsoleTitleA,GetConsoleTitleAprot ...

Posted by Kitara on Tue, 21 Mar 2023 06:48:21 +0300

C Realizes Stack and Effective Parentheses of OJ Problem

Stack concept and basic operations The stack is also a kind of linear list just like the linked list and the sequential list, but it is special. The stack follows a first-in, last-out principle. In fact, the stack is like stacking plates in life. Stack the plates one by one, every time It can only be stacked on the top layer, and when ta ...

Posted by prozad on Mon, 20 Mar 2023 14:11:13 +0300

WeChat 3D Mini Game Series 1: Using threejs in WeChat Mini Games

Environment configuration Download developer tools download link: https://developers.weixin.qq.com/miniprogram/dev/devtools/download.html The development of WeChat mini-programs/mini-games needs to be done in a dedicated developer tool. You can download the latest stable version. If you have not used WeChat development before, go ...

Posted by zuhalter223 on Sun, 19 Mar 2023 09:07:37 +0300

Nacos Registry - Health Check Mechanism Source Code

Table of contents 1. Introduction to health check 2. Client health check 2.1 Health check of temporary instance 2.2 Health check of permanent instance 3. Server health check 3.1 Health check of temporary instance 3.2 Permanent instance server health check 1. Introduction to health check After a service instance is registered in Naco ...

Posted by skyturk on Sun, 19 Mar 2023 07:32:17 +0300

[Small test] Based on the JDK1.8 image, the project is automatically deployed to docker with one click

Background of the project We often see multiple deployment methods of applications on the open source platforms of Github or Gitee. Many applications already support one-click packaging, deployment and operation of the docker compose orchestration tool. For example, Ruoyi project One-click orchestration and deployment of supported applicat ...

Posted by slicer123 on Fri, 17 Mar 2023 22:07:33 +0300

linux_vim text editor (vi), command mode, text mode, visual mode, last line mode) [command arrangement]

Continued from the previous article: linux command line shutdown and restart (poweroff command, reboot command, shutdown command) This time, I will share the vim text editor under linux. Vim has command mode, text mode, visual mode, and last line mode. There are different operations in each mode. Let’s learn together now: 1. Descript ...

Posted by Verrou on Thu, 16 Mar 2023 04:07:22 +0300

HCIA datacom RS comprehensive experiment, with detailed configuration commands

1 Experimental Topology2 Experimental RequirementsAll internal network segments are divided from 192.168.0.0/24, and the operator allocates 202.102.24.96/30and 120.202.249.192/30 to the border router;Internal client A belongs to VLAN 10, and internal client B belongs to VLAN 20;The dual links between the three internal switches use Ethernet cha ...

Posted by troublemaker on Mon, 13 Mar 2023 16:52:20 +0300

[C++] memory management

Division of Memory Areas in C/C++   Kernel space, user code cannot read and write;   The stack area is also called the stack, which is used to store non-static local variables/function parameters/return values, etc. The stack grows downward;   The memory-mapped segment is an efficient I/O mapping method for lo ...

Posted by jbrill on Mon, 13 Mar 2023 08:51:38 +0300