C + + octet sharing - data structure II - hash table
C + + octet sharing - data structure II - hash table
preface
What is a hash table?
The search Binary Tree finds the value by comparing it with the target value one by one from the root node, and then looking down until the target value is found or the root node is not found. The time complexity is O (log n). In the hash table, the value and ...
Posted by argrafic on Sat, 19 Feb 2022 02:43:16 +0100
Free pie (HDU-1176)
Title Link: http://acm.hdu.edu.cn/showproblem.php?pid=1176 Main idea of the title: At first, the gameboy is on coordinate 5. He can only move in 0-10 coordinates, and the gameboy at position I can only connect the pie at one position of (i-1),(i),(i+1) in the next second (there may be more than one pie falling at this time). Find out how many p ...
Posted by audiodef on Sat, 19 Feb 2022 02:41:25 +0100
Record of sword finger offer
Record of sword finger offer (1) (February 18, 2022)
Write in the front: I haven't learned c + +. Refer to the problem-solving comments and learn while brushing the questions.
data structure
Print linked list from end to end
describe Enter the head node of a linked list and return the value of each node in the order from the end to the h ...
Posted by ursvmg on Sat, 19 Feb 2022 02:34:01 +0100
Force buckle -- design cycle queue (problem solution)
This problem needs to implement a circular queue, so before that, we need to know the concept and structure of queue
Queue: a special linear table that can only be inserted at one end and deleted at the other end. It has the characteristics of first in first out, then in and then out Delete one end of the queue Enter the queue: the end of t ...
Posted by trygve on Sat, 19 Feb 2022 01:32:12 +0100
[LeetCode] fully understand the knapsack problem
0. Origin
0-1 knapsack: max min problem
Concept: there are N items in total. The weight of item I (I starts from 1) is w[i], and the value is v[i]. When the total weight does not exceed the upper limit W of the backpack, what is the maximum value that can be loaded into the backpack? Idea: define a two-dimensional array dp to store the ...
Posted by juschillin on Sat, 19 Feb 2022 01:13:37 +0100
TuckER:Tensor Factorization for Knowledge Graph Completion
Source: ICML2019
Paper link: https://arxiv.org/abs/1901.09590
Code link: https://github.com/ibalazevic/TuckER
Conclusion: This article uses an advanced formula. Many people may be afraid when they see this formula. Indeed, I feel dizzy when I see this formula and don't know the specific meaning. In fact, if you really don't understand th ...
Posted by roxiroxi on Fri, 18 Feb 2022 22:31:03 +0100
Shortest path problem
Shortest path problem
Sequence: shortest path problem: find the weight and minimum path length from one point to another in the graph. (the following n indicates the number of points and m indicates the number of sides)
I Naive dijkstra algorithm
Principle: dijkstra algorithm is based on breadth first search and expands each poin ...
Posted by oddyseys on Fri, 18 Feb 2022 21:17:43 +0100
Data structure - sort
1 bubble sort
1. The data to be sorted can be in array or linked list 2. Exchange only when strictly unequal, that is, when equal, do not exchange, which shows that the algorithm is stable
Pseudo code
void Bubble_Sort(ElementType A[], int N)
{
for (p = N - 1; p > 0; p--)
{
flag = 0;
for (i = 0; i < p; i++)
{
if (A[i] > ...
Posted by christh on Fri, 18 Feb 2022 18:59:03 +0100
Huawei cursor location
1, Title Description
Because the screen of MP3 Player is small, when displaying the list of songs, only a few songs can be displayed on each screen. Users can browse all songs through up and down buttons. In order to simplify the processing, it is assumed that only 4 songs can be displayed on each screen, and the initial position of the cursor ...
Posted by surreal5335 on Fri, 18 Feb 2022 17:27:56 +0100
05 bucket sort, count sort and cardinality sort of sorting operation
Because the time complexity of bucket sorting, counting sorting and cardinal sorting is o(n) linear, these three sorting methods belong to linear sorting. The principles of these three algorithms are not difficult, and the analysis of time complexity and space complexity is relatively simple, so we will focus on the applicable scenarios of the ...
Posted by Misticx on Fri, 18 Feb 2022 14:48:23 +0100