Analysis of leetcode problem solving ideas 735 - 743 questions

Star collision Given an integer array astroids, the planets in the same row are represented. For each element in the array, its absolute value represents the size of the planet, and positive and negative represents the moving direction of the planet (positive represents moving to the right, negative represents moving to the left). Each planet m ...

Added by CrusaderSean on Sat, 15 Jan 2022 00:33:37 +0200

Wang Dao exercises in section 2.23 of data structure

Bibliography: 2022 data structure review guide for postgraduate entrance examination organized by Kingway Forum 1. Delete the element with the minimum value from the sequence table (assuming unique) and return the value of the deleted element by the function. The empty position is filled by the last element. If the sequence table is empty, an ...

Added by zalath on Fri, 14 Jan 2022 23:46:08 +0200

Reconstruction of roads with DP template on trees

DP on tree Template problem: rebuilding roads https://www.luogu.com.cn/problem/P1272 Meaning: There are n points and n-1 edges. Finding at least how many edges to remove will separate a subtree containing P points from other nodes. analysis: By reading the question, we can know that this tree contains root nodes and is acyclic, so we can ...

Added by szalinski on Fri, 14 Jan 2022 23:00:10 +0200

Daily practice (day03 -- dynamic programming dp)

preface I've been dragged to the bride in the last two days and haven't done anything. So let's start with a few simple questions to find self-confidence (dog head) subject Arithmetic square Give you a nonnegative integer x, calculate and return the arithmetic square root of X. Since the return type is an integer, only the integer ...

Added by maheshb on Fri, 14 Jan 2022 22:53:50 +0200

Data structure and algorithm

Notes: Queue: (offer, poll, element) A queue is a linear table that only allows insertion at one end and deletion at the other end. ——We call the end that is allowed to be deleted as the front and the end that is inserted as the rear ——A queue without any data elements is called an empty queue ——Queue is ...

Added by tat on Fri, 14 Jan 2022 21:14:59 +0200

3 multistage decision making problem

9.3 multistage decision making problem This chapter looks at the problem first. 9.3.1 shortest path of multi segment diagram 9-4 unidirectional TSP (UVA 116) For an integer matrix with M rows and N columns (m < = 10, n < = 100, the data range here is to remind you that this is a matrix whose width may be much greater than its length ...

Added by SpinCode on Fri, 14 Jan 2022 20:31:46 +0200

[optimization prediction] optimize ELM prediction of limit learning machine based on Matlab genetic algorithm [including Matlab source code 1673]

1, Introduction to ELM neural network 1 Introduction Extreme learning machine is not a new thing, but has new content in algorithm (method). In terms of neural network structure, it is a forward propagation neural network, and the significance of previous blog posts. 2 ELM's biggest innovation 1) The connection weight between the input layer ...

Added by mgzee on Fri, 14 Jan 2022 17:38:31 +0200

Based on Weka platform, the attribute weighted naive Bayesian algorithm based on differential evolution algorithm is studied

Based on Weka platform, the attribute weighted naive Bayesian algorithm based on differential evolution algorithm is studied Personal interest, hope to help you preface    naive Bayesian algorithm is widely used because of its high classification accuracy and simple model, but it is difficult to realize in practical classif ...

Added by slimboy007 on Fri, 14 Jan 2022 17:35:09 +0200

The top ten sorting of data structure (Zuo Cheng Yun Zuo Shen version) is continuously updated

This is the sorting algorithm I learned in the video of the latest left God data structure algorithm on station b 2021. I feel very good Here to share with you 1. Select Sorting 1.1 idea of selecting sorting Refer to the figure drawn by Zuo Shen: (1) Traverse the array from the beginning (subscript 0 position), find the minimum value, and ...

Added by emehrkay on Fri, 14 Jan 2022 16:50:48 +0200

Modular combination - Lucas/exLucas - LibreOJ #181 Binomial coefficient

Proof and code are separated, and you can jump according to your own needs. Go to my Blog, maybe the reading effect is better Lucas theorem ( n ...

Added by js_280 on Fri, 14 Jan 2022 16:09:37 +0200