Feng Baobao said: array

Chapter IV: array two 1. Array overview and features two 1.1 concept of array two 1.2 creation of array two 1.2.1 dynamically creating arrays two 1.2.2 statically creating arrays two 1.3 basic operation of array three 1.4 default initialization of array five 1.5 heap and stack in JVM (emphasis) five 2. Common operations of array six 2 ...

Added by ktstowell on Thu, 13 Jan 2022 16:28:53 +0200

HENAU winter camp search topic (A-L)

A - chessboard problem Put pieces on a chessboard of a given shape (the shape may be irregular), and there is no difference between the pieces. It is required that any two pieces cannot be placed in the same row or column in the chessboard. Please program to solve all feasible placement schemes C for placing k pieces for a chessboard of given ...

Added by shanu_040 on Thu, 13 Jan 2022 15:58:38 +0200

[algorithm learning] - sliding window algorithm (javascript)

Sliding window algorithm:Literally, everyone has seen the window and can open and close the window ×)The window of the sliding window algorithm here is divided into fixed and unfixed. The fixed window is the kind of window seen in life. Imagine a large window, and then the sliding screen window. The screen window here is a fixed sliding w ...

Added by mgoerz on Thu, 13 Jan 2022 14:26:19 +0200

Codeforces Round #765 (Div. 2) A~C problem solution (it's so simple, super detailed and necessary for getting started)

A. Ancient Civilization Title portal I'll give you an array a (decimal) with a length of n,, now ask you to take out an ANS (decimal system),, so that the sum of position differences corresponding to a[i] (binary) and ans (binary) is minimized. Take chestnuts for example: the binary of a[i]=5 is 101, and the binary of ans=10 is 1010. When w ...

Added by Shazbot! on Thu, 13 Jan 2022 10:59:53 +0200

Algorithm problem 1: minimum covering substring

1, Problem description Here are two strings S and T. please find the shortest substring containing all the characters in T in S. If there is no such substring, the algorithm returns an empty string; If such a substring is found, the answer can be considered to be unique. 2, Violent solution 1. Algorithm //Violent solution string fun(string ...

Added by mikeyca on Thu, 13 Jan 2022 08:10:15 +0200

Handwritten derivation of linear regression (gradient descent method, normal equation method)

This paper mainly starts with the mathematical principle, and discusses how to make the computer learn the linear regression equation through the known data. Before we go into detail, let's take a look at an example. This is a statistical table about the amount of bank loans. It can be seen that in this example, the bank loan amount is relat ...

Added by hack4lk on Thu, 13 Jan 2022 05:42:20 +0200

The third chapter of the basic algorithm series -- the shortest path problem in graph theory

There are five commonly used shortest path algorithms in graph theory. They are coming. All the villains are coming 💣 The enemy has five seconds to reach the battlefield~ 💓 On graph theory Graph theory has a long history, but graph theory is an important concern in both company interview and programming competition. Now there may b ...

Added by andrewcy on Thu, 13 Jan 2022 02:03:06 +0200

C. Division by Two and Permutation

Catalog C. Division by Two and Permutation A. Plus One on the Subset B. Make AP C. Division by Two and Permutation Topic Description Interpretation Given a n array of size n, you can do something like delete a and put a/2 (rounding down) into the array. We can do this many times and output YES if we can get a full permutation ...

Added by DaveTomneyUK on Wed, 12 Jan 2022 22:59:51 +0200

Li Kou 904 - fruit basket (dynamic programming)

Title (medium) You are visiting a farm where a row of fruit trees are planted from left to right. These trees are represented by an integer array of fruits, where fruits[i] is the fruit species on the ith tree. You want to collect as many fruits as possible. However, the owner of the farm has set some strict rules. You must pick fruit accordi ...

Added by hypuk on Wed, 12 Jan 2022 20:29:32 +0200

LeetCode 32. Longest valid bracket

Topic Overview: Title link: Ask me to do the problem Problem 1. Unpassable Violence Algorithms _To be honest, the first thing I thought of was this method, but it would exceed the time limit. _Its idea is simple, two-tier loops find each substring, and then use the stack to determine if each substring is a valid substring, which is simpler ...

Added by tinyang on Wed, 12 Jan 2022 19:16:39 +0200