java code implementation of merging and sorting
Merge sort is a divide and conquer algorithm. Using recursion, a large data set is decomposed into small subsets. The subsets are ordered and then merged. Merge sort is not an in-situ sort algorithm because it uses temporary space, which is also the main reason why merge sort is not widely used in quick sort. Although the time complexity of mer ...
Added by bb_sarkar on Sun, 20 Feb 2022 17:28:19 +0200
Collections class operation collection
Collections class operation collection
Collections class is a tool class for manipulating collections such as Set,List and Map provided by Java. Collections provides many static methods for manipulating collections, with which collection elements can be implemented Sort, find, replace, and copy. The following describes the methods commonly use ...
Added by leeue on Sun, 20 Feb 2022 14:48:56 +0200
[PCL self study: kdTree] the principle and use of KD tree in PCL (continuously updated)
1, KD tree principle
in this chapter, we will learn how to use KdTree to find K nearest neighbors of a specific point or location, and then we will also learn how to find all neighbors within a radius specified by the user (random in this example).
1) What is KD tree?
k-dTree, called k-dimensional tree, is a data stru ...
Added by jjmusicpro on Sun, 20 Feb 2022 11:47:45 +0200
Basic data structure: linked list, monotone stack, monotone queue
1, Linked list and adjacency list
1 linked list
here, we do not use the commonly used structure plus pointer to realize the linked list, because in this way, each node should be new. The number of linked list nodes in common written test questions is 1e5~1e6 level, and new alone is enough to timeout.
so we use arrays ...
Added by ddragas on Sun, 20 Feb 2022 09:08:23 +0200
HashMap source code analysis + interview questions, based on jdk1 8 line by line analysis, this is enough for the interview!
Before reading this article, it is recommended to read the blogger's article on red black tree, which describes the evolution from binary sort tree → AVL tree → red black tree. Transmission address: Quick understanding of red and black trees
HashMap source code analysis + interview questions
1, Hash introduction
Core theory
...
Added by lingo5 on Sun, 20 Feb 2022 08:43:57 +0200
[ACWing]2188. Upper and lower bounds of passive sink feasible flow
Title address:
https://www.acwing.com/problem/content/2190/
Given a containing
n
n
n points
m
m
For a digraph with m edges, each edge has a lower bound and an upper bound. Find a feasi ...
Added by ajpasetti on Sun, 20 Feb 2022 07:23:11 +0200
Group B of JAVA University in the first game of the 12th Blue Bridge Cup 2021
Tip: This article has 6000 words, rough reading takes about 5 minutes and intensive reading takes about 30 minutes
viewpoint
This year's provincial tournament is a little different from the past. It pays more attention to mathematics, algorithms and ideas, and is a little closer to ACM. I believe this is a trend, and the future Blue Bri ...
Added by sella2009 on Sun, 20 Feb 2022 06:43:35 +0200
Blue Bridge Cup ALGO-1006 gold coin dynamic programming double solution
subject
analysis
This is a typical example of dynamic programming. The optimal substructure should be selected at each step, that is, the lattice that can get the most gold coins.
Here are two ideas to solve this problem: backtracking and dp array. These two ideas can be said to find the optimal solution in the opposite way, one from top t ...
Added by joeami on Sun, 20 Feb 2022 06:29:30 +0200
Common code sharing of data structure and algorithm
Transferred from: Micro reading https://www.weidianyuedu.com
Data structure and algorithm are programmers' internal mental skills and basic skills. Whether in artificial intelligence or other computer science fields, mastering solid knowledge of data structure and algorithm will often help a lot! Today I recommend you a good data structure ...
Added by freakus_maximus on Sun, 20 Feb 2022 04:50:38 +0200
01_ Single case design mode
4. Creation mode
The main focus of creative mode is "how to create objects?", Its main feature is "separating the creation and use of objects".
This can reduce the coupling degree of the system, and users do not need to pay attention to the creation details of objects.
The creation mode is divided into:
Singleton modeFac ...
Added by jeff_borden on Sun, 20 Feb 2022 04:47:20 +0200