Differential-Prefix Sum

Prefix sum is an important preprocessing tool in the algorithm. Okay, I can't make it up anymore, it seems I don't have any [doge] Differential operations, which can be said to be the inverse of the sum of prefixes, are often used together with the prefix to solve some interval problems. Recently, I also encountered a lot of diffe ...

Added by jtp51 on Sun, 20 Feb 2022 03:14:19 +0200

Binary search tree debut

Recently, I have made many problems about binary search tree, and found that many problems are solved by using the properties of binary search tree, and the routines are almost the same. Here is a summary. Properties of binary search tree If its left subtree is not empty, the value of all nodes on its left subtree is less than that of its roo ...

Added by modplod on Sat, 19 Feb 2022 19:55:41 +0200

The type of the largest child column

Question E: sequence game Time limit: 1.000 Sec memory limit: 128 MBSubmit state Title Description Xiao Ming is playing a series summation game recently in order to exercise his intelligence. Let the length of the sequence be n, and each number is an integer within the range of [- 1000], that is, the range is - 1000 ~ 1000. Rules of the g ...

Added by sam06 on Sat, 19 Feb 2022 18:49:35 +0200

Design and implementation of mode algorithm

Problem Description: Condition: given a multiple set s Containing n elements, the number of times each element appears in S is called the multiplicity of the element. The element with the largest multiplicity in the multiple set s is called mode. For example, S={1, 2, 2, 3, 5}. The mode of multiple set S is 2 and its multiplicity is 3.Note ...

Added by heropage on Sat, 19 Feb 2022 15:54:36 +0200

youcans OpenCV learning course - 9 Frequency domain image filtering

youcans OpenCV learning course - 8 Frequency domain image filtering (Part 2) This series is for Python Xiaobai and explains the actual combat of OpenCV project from scratch. Image filtering is a common image preprocessing operation to suppress the noise of the target image while preserving the detailed features of the image as much as possible ...

Added by johncollins on Sat, 19 Feb 2022 15:24:05 +0200

[ACWing]1125. Cattle travel

Title address: https://www.acwing.com/problem/content/description/1127/ Farmer John's farm has many pastoral areas, and some paths connect some specific pastoral areas. A pastoral area with all the connections is called a pasture. But for now, you can see that at least two pastoral areas are not connected. Now, John wants to add a path to the ...

Added by jayshadow on Sat, 19 Feb 2022 15:06:22 +0200

Leetcode notes -- modification and construction of binary search tree in binary tree chapter

Catalogue of series articles I Array type problem solving method 1: dichotomy II Array type problem solving method 2: Double finger needle method III Array type problem solving method 3: sliding window IV Array type problem solving method 4: simulation V The basic operation and classic topics of the linked list Vi Classic title of hash tab ...

Added by kb9yjg on Sat, 19 Feb 2022 13:43:47 +0200

Week 5 of 2005 -- program design and algorithm test

28: the number of the same number as the specified number Total time limit: 1000ms memory limit: 65536kB describe Outputs the number of the same number as the specified number in an integer sequence. input The input contains three lines: The first line N represents the length of the integer sequence (N < = 100); The second line is N integ ...

Added by kjelle392 on Sat, 19 Feb 2022 12:52:39 +0200

Algorithm analysis and Design Experiment 3 dynamic programming

Experimental environment Windows 10+DEV-C++ dynamic programming Dynamic programming is a hot topic in algorithm design and analysis. If the optimal solution of a problem (usually the maximum or minimum value) is required, and the problem can be decomposed into several problems, and there are overlapping subproblems between small problems ...

Added by reub77 on Sat, 19 Feb 2022 12:11:44 +0200

Binary tree [C language]

1. Trees Nonlinear data structure Trees are recursively defined Each tree is composed of root + multiple subtrees, and the subtree structure is the same Representation of trees The tree has no rules on how many children he has C + + will be easier to write Left child right brother notation struct Node { struct Node* _ ...

Added by cjconnor24 on Sat, 19 Feb 2022 10:50:28 +0200