[data structure] independent path calculation

Problem description Lao Zhang and Lao Wang love to climb mountains. They must climb Xiangshan once a week. Once, the two people had a dispute about how many paths there were from the east gate to Xianglu peak, so they agreed that who walked the route that the other party didn't walk in a period of time would win. Given a circuit diagram (undir ...

Added by nttaylor on Fri, 24 Dec 2021 20:40:25 +0200

[JAVA] find the number between two adjacent numbers in the number sequence (Pro20211203) (IndexTree / DP)

subject N people of different heights stand in a row at certain intervals. Everyone monitors whether the people they can see are doing other things according to the following rules. Rule: no one can be taller than me between me and the i-th person I want to monitor, No one can be taller than the i-th person. For example, according to the ...

Added by Grimloch on Fri, 24 Dec 2021 16:55:56 +0200

Linked list printing (linked list inversion output)

1. Title Description: Enter the head node of a linked list and print the value of each node from tail to head. The linked list is defined as follows: struct ListNode { int m_nKey; ListNode* m_pNext; } 2. Test case Function test (the input linked list has multiple nodes; the input linked list has only one node)Special input test (the input ...

Added by phillfox on Fri, 24 Dec 2021 12:24:58 +0200

Graph of data structure and algorithm

What is a graph In the previous article, we learned the concept of tree, focusing on binary tree. Graph is a little similar to tree in topology, but graph is not a tree Intuitively, let's first look at the topology of a graph: Undirected graph The above shows an undirected graph. An undirected graph is a graph without direction. As long a ...

Added by azn_romeo_4u on Fri, 24 Dec 2021 06:02:08 +0200

On the importance of algorithm in C language

Recently, I have been learning data structures and algorithms. I deeply feel that our language learning is always just a tool, and the method is the most important part. In this article, I will illustrate the importance of algorithm, that is, the idea of writing program, in the program through several examples. catalogue 1, Question 1 (pri ...

Added by ffdave77 on Fri, 24 Dec 2021 03:55:42 +0200

2021 may day cup mathematical modeling problem A vaccine production

2021 may day cup mathematical modeling problem A Vaccine production issues The novel coronavirus pneumonia has been a worldwide disaster and has brought serious disasters to the world. Countries have developed new vaccines to control the epidemic. It is assumed that vaccine production needs to go through four process flows: CJ1 station, CJ2 s ...

Added by Lagreca on Thu, 23 Dec 2021 23:49:47 +0200

Summary of ranking methods (stability and complexity issues)

Summary of ranking methods (stability and complexity issues) preface Data structure final exam, to analyze various sorting methods, complexity problems and stability problems, let's summarize here. I hope it can help you who are reading this article! ( ^ - ^ )! stability Generally speaking, the so-called stability is that if there are t ...

Added by TheAngst on Thu, 23 Dec 2021 14:43:28 +0200

2021-12-23 [data structure course design] [key path]

Critical path: Planning, construction process, production process and procedure process are usually regarded as a project. The project is usually divided into several sub projects called "activities". After these "activities" are completed, the project can be completed. AOE net is usually used to represent engineering. AOE ...

Added by bigger on Thu, 23 Dec 2021 14:18:01 +0200

javascript implements five sorting algorithms (bubble sorting, selection sorting, insertion sorting, Hill sorting and quick sorting) j

Bubble sorting algorithm O(N*N) of sorting algorithm: Principle: 1. Compare the size relationship of two adjacent elements from beginning to end for each element that is not sorted 2. If the element on the left is large, the two elements exchange positions 3. Move one position to the right and compare the following two elements 4. Moving to th ...

Added by magic2goodil on Thu, 23 Dec 2021 13:31:02 +0200

Load balancing algorithm involved in dubbo

Load balancing algorithm in dubbo When there are multiple service providers in dubbo, there is a cluster of services. There are some algorithms for how to allocate service calls in the cluster to select appropriate services to provide services. Polling load balancing algorithm roundrobin loadbalance As the name suggests, polling is t ...

Added by justin15 on Thu, 23 Dec 2021 08:00:25 +0200