[sitge cup · blue bridge on cloud - algorithm training camp] the mystery of the path in week 2

Xiao Ming pretends to be the knight of Planet X and enters a strange castle. There was nothing in the castle, only the ground made of square stones. Suppose the castle ground is n x n squares. [as shown in Figure 1.png]. According to custom, knights walk from the northwest corner to the southeast corner. It can move horizontally or vert ...

Posted by bugsuperstar37 on Tue, 18 Jan 2022 09:56:13 +0100

Java implements the responsibility chain pattern

What is the responsibility chain design pattern Responsibility chain design pattern is a common design pattern in software development. In this pattern, a request is processed step by step to form a chain. The request is processed in the nodes of the chain, and one node processes its own logic and then passes it to the next node. In many open ...

Posted by webing on Tue, 18 Jan 2022 07:21:39 +0100

acwing-2060. Cow beauty pageant

Hearing that the two spotted cows were the most popular recently, John immediately bought a batch of two spotted cows. Unfortunately, fashion trends often change quickly, and the most popular cow has become a spotted cow. John hopes that by coloring each cow, the two spots on their body can be combined into one spot, so that they can be more fa ...

Posted by GarroteYou on Tue, 18 Jan 2022 06:53:21 +0100

Basic data structure -- binary tree

Advantages of binary tree: It can be accessed very efficiently on the binary tree. Binary tree is very suitable for interval operation. A subtree in a binary tree can be regarded as a sub interval of the whole tree. It is very fast to find the interval maximum, interval sum, interval flip, interval merge, interval split, etc. Binary tree is ver ...

Posted by ankycooper on Tue, 18 Jan 2022 02:47:57 +0100

C + + learning notes -- Standard Template Library STL

C + + learning notes ----Standard template library STL I Standard template library introduce The standard template library implements the commonly used data structures (vector encapsulated array, list encapsulated linked list, map and set encapsulated binary tree, etc.) and the basic algorithms for operating these data structures (inserti ...

Posted by plautzer on Tue, 18 Jan 2022 02:45:12 +0100

[Microsoft algorithm interview high frequency question] bus route

Several bosses of Microsoft and Google organized an interview question brushing group, which can add administrator VX: sxxzs3998 (note CSDN) to participate in discussion and live broadcast 1. Title Give you an array of routes that represent a series of bus lines, where each route [i] represents a bus line on which the ith bus will cycle. For ...

Posted by rbragg on Tue, 18 Jan 2022 02:37:23 +0100

11. Integrated learning practice

API parsing AdaBoost algorithm (reduction coefficient needs to be added to solve the problem of infinite amplification caused by abnormal data, resulting in error) parameter AdaBoostClassifier AdaBoostRegressor base_estimator Weak classifier object, the default is CART classification tree DecisionTreeClassifier; Weak regressor object, the ...

Posted by DocUK on Mon, 17 Jan 2022 23:56:47 +0100

numpy_6 sorting, searching, counting and collection operations

sort Direct sort () numpy.sort(a[, axis=-1, kind='quicksort', order=None]) Axis: sort along the (axis) direction of the array. 0 means by vertical axis, 1 means by horizontal axis, and None means expand to sort. The default is - 1, which means sort along the last axis. kind: sorting algorithm, which provides fast sorting 'quicksort', mixe ...

Posted by jmrothermel on Mon, 17 Jan 2022 20:54:26 +0100

Programmer code interview guide (written by Zuo Chengyun) learn ing to punch in

catalogue Chapter 1 stack and queue CD5 design the stack of getMin function describe Realize a stack with special functions, and then realize the operation of returning the smallest element in the stack on the basis of realizing the basic functions of the stack. Enter Description: In the first line, enter an integer N, which represe ...

Posted by squariegoes on Mon, 17 Jan 2022 20:15:03 +0100

[Matlab image encryption] orthogonal Latin square + two-dimensional Arnold scrambling image encryption [including GUI source code phase 813]

1, Introduction to orthogonal Latin square scrambling and two-dimensional Arnold scrambling 0 Introduction With the rapid development of communication technology, more and more fields need to transmit digital image signals, so the security of information transmission is becoming more and more important. There are two protection technologies co ...

Posted by simona_85 on Mon, 17 Jan 2022 20:07:13 +0100