"War epidemic Cup" online invitational tournament -- solution to game 5

"War epidemic Cup" online invitational tournament -- solution to game 5 Topic details - 1 where is the source of infection (pintia.cn) Through a recent nucleic acid test, the epidemic prevention and control team detected several positive persons. By retrieving the trip code data, the prevention and control team obtained the places w ...

Posted by torvald_helmer on Sat, 14 May 2022 00:40:22 +0300

LeetCode_ Interview question 01.05 One edit

LeetCode_ Interview question 01.05 Primary edit [medium] Topic: Title: There are three editing operations for Strings: insert a character, delete a character, or replace a character. Given two strings, write a function to determine whether they require only one (or zero) edit. Example 1: input: first = "pale" second = "ple" output: Tru ...

Posted by Tyrant on Fri, 13 May 2022 23:56:30 +0300

[C language] the realization of Sanzi chess and some small improvements in AI (attack, defense, occupying favorable terrain)

This blog is aimed at C language beginners. For example, the AI part of the computer is only some relatively simple improvements (attack, defense, occupying favorable terrain), and does not involve intelligent algorithms (such as game tree). Some of the codes contain my understanding of programming. If there are deficiencies, please give me mor ...

Posted by ryy705 on Fri, 13 May 2022 23:06:01 +0300

leetcode sword finger Offer 38 Arrangement of strings

Sword finger Offer 38 Arrangement of strings Title Description Enter a string and print out all the arrangements of characters in the string. You can return this string array in any order, but there can be no duplicate elements in it. Example: Input: s = "abc" Output:["abc","acb","bac","bca","cab","cba"] Restrictions: 1 <= s Length of &lt ...

Posted by alex_savin on Fri, 13 May 2022 11:45:28 +0300

Computer algorithm design and analysis (Chapter II computer practice)

7-1) binary search Enter n values (1 < = n < = 1000), n integers in non descending order and the number x to be found. Use the binary search algorithm to find x, and output the subscript (0~n-1) where x is located and the number of comparisons. If X does not exist, output - 1 and the number of comparisons. #include <iostream> ...

Posted by YappyDog on Fri, 13 May 2022 10:12:34 +0300

[Image segmentation] Image segmentation based on multiple algorithms of global threshold, otsu, and adaptive threshold, including Matlab source code

  1 Introduction It focuses on the threshold research methods in image segmentation, including the global threshold method and the adaptive threshold method. The manual selection method, iterative threshold selection method, maximum inter-class variance method and watershed in adaptive algorithm in the global threshold algorithm are discussed. ...

Posted by bemoi on Fri, 13 May 2022 01:19:55 +0300

"War epidemic Cup" online invitational tournament -- solution to the third game

"War epidemic Cup" online invitational tournament -- solution to the third game Topic details - 1 grid of epidemic prevention and control (pintia.cn) Due to the severe situation of prevention and control, z City has started the grid sealing and control management of the whole region. The area of the city can be regarded as a rectang ...

Posted by smarlowe on Thu, 12 May 2022 23:32:49 +0300

Section 7.3 of algorithm notes - special topic of data structure - > linked list processing

Section 7.3 of algorithm notes - Special Topic on data structure (1) - > linked list processing Problem A: algorithm 2-8 ~ 2-11: basic operation of linked list Title Description Linked list is one of the most basic data structures. It is a linear list realized by linked storage structure. Compared with the sequential table, it does not ha ...

Posted by minds_gifts on Thu, 12 May 2022 22:26:46 +0300

Data prediction -- the thought and practice of user loss income prediction

premise The demand related to data prediction is received for the first time. It can be said that it has something to do with "data mining", rather than the conventional data retrieval, query and export of duplicate disk. Therefore, it is still more motivated and interested to try to realize this demand. Because I haven't systematical ...

Posted by aboyd on Thu, 12 May 2022 15:10:28 +0300

Implementation of common sorting algorithm in python

  Sorting algorithm is a basic algorithm in computer science, and it is widely used at the same time. python functions also have built-in sorting interfaces, such as the sorted function. In actual production, the sorting algorithm we use in different scenarios will be slightly different. The selection of sorting algorithm mainly considers the ...

Posted by jamesp on Wed, 11 May 2022 22:16:52 +0300