Algorithm to improve the java problem solution of agent series
Resource constraints
Time limit: 1.0s Memory limit: 256.0MB
Problem description
zsyzgu is A weak dish. Nevertheless, he participated in the agent series. The problem of the agent series is simplified as follows. There is A monkey and some mining points. They know their coordinates on the plane. The monkey has to pass through these mi ...
Added by CincoPistolero on Sun, 05 Dec 2021 05:54:37 +0200
DFS pruning and searching
DFS pruning and searching
The first thing to ensure in designing DFS search is to design a reasonable search order that can cover all States.
However, the number of DFS search States increases exponentially, and some of these states are 'useless'. Therefore, we need to reduce the search states through pruning strategy to improve the efficiency ...
Added by derrtyones on Sun, 05 Dec 2021 03:26:52 +0200
Custom regular expression matching algorithm for Java
preface
Customize the regular expression rules, and then complete the implementation of the matching algorithm.
1, Title
Please implement a function to match regular expressions containing '.' and '*'. The character '.' in the mode represents any character, and '/ *' represents that the character before it can appear any time (in ...
Added by mbaroz on Wed, 01 Dec 2021 10:55:44 +0200
leetcode notes
1.Hash related
When using HashMap, why can you find the corresponding value according to map.get(key) with time complexity O(1)?
Because the physical structure uses a hash table
Calculate the array position where the Entry should be stored according to a special algorithm. If the positions are the same, there are various methods to solve the ...
Added by deejay1111 on Wed, 24 Nov 2021 18:54:55 +0200
dfs, bfs (several examples)
preface
Tip: the following is the main content of this article. The following cases can be used for reference
I P1683 getting started
Title Description Not everyone can enter Taohua island. Pharmacist Huang hates people as stupid as Guo Jing. Therefore, he built a path at the only entrance to Taohua Island, which was all paved with ...
Added by jlryan on Sat, 30 Oct 2021 07:06:13 +0300
Introduction to graph theory and implementation of depth first traversal and breadth first traversal
Introduction to graph theory
Definition of graph
Graph G =(V,E),V is a finite non empty set of vertices, and E is an edge set. V(G) and E(G) represent the vertex set and edge set of G, respectively. Where E(G) can be an empty set. If E(G) is a set of directed edges, then G is a directed graph, otherwise it is an undirected graph. < x, ...
Added by virtual_odin on Sat, 11 Sep 2021 22:34:20 +0300