[graphic algorithm] minimum spanning tree

Today we introduce another part of graph theory, the minimum spanning tree. Students interested in the shortest path of the graph can see: [graphic algorithm] solve the shortest path problem at one time 1. Introduction to minimum spanning tree The concept of minimum spanning tree: in all spanning trees of a connected network, the cost ...

Posted by Telemachus on Tue, 19 Apr 2022 10:23:41 +0300

536. Generate binary tree from string

I don't think this problem is very difficult, but there are many details to deal with; After reading the solution, I found that my thinking is actually very similar to the solution; But in many places, my handling method is problematic; This leads to more and more confusion in the following codes; This problem has delayed too many solut ...

Posted by FrankHarley on Tue, 19 Apr 2022 09:36:31 +0300

L2-013 red alarm (25 points)

subject It is very important to maintain connectivity between cities in war. This topic requires you to write an alarm program. When the loss of a city causes the country to be divided into several unconnected areas, you will send out a red alarm. Note: if the country is not fully connected and is divided into k regions, and the loss of one ci ...

Posted by dabaR on Tue, 19 Apr 2022 07:20:40 +0300

Algorithm for adjusting the order of array elements

preface There is an integer array. We want to sort the elements in the array according to specific rules. For example, all odd numbers in the array are in the first half of the array. This article will take you to implement this algorithm. All interested developers are welcome to read this article. Realization idea Let's analyze through an ...

Posted by novice4eva on Tue, 19 Apr 2022 02:44:53 +0300

Full fire mode matching KMP algorithm

🙋 Personal website: Luyao leaf🤟 Copyright: This article was originally written by [Lu Yao Ye], and launched in CSDN. If you need to reprint it, please contact the blogger💖 If the article is helpful to you, welcome to follow, like, collect (one click, three links) and subscribe to the column💅 To find a small partner for common growth, plea ...

Posted by Vasko on Tue, 19 Apr 2022 02:07:39 +0300

Detailed explanation of "data structure and algorithm" B-tree (including complete code)

Wechat search: Menon StayUp Home address: https://gozhuyinglong.github.io Source code sharing: https://github.com/gozhuyinglong/blog-demos 1. Preface So far, it has been introduced< Binary lookup tree >And< AVL tree >, we always assume that the entire data structure can be stored in memory. However, if there is too much data to fit ...

Posted by FinalMjolnir on Mon, 18 Apr 2022 23:25:49 +0300

Data structure and algorithm AVL tree (balanced binary tree)

Wechat search: Menon StayUp Home address: https://gozhuyinglong.github.io Source code sharing: https://github.com/gozhuyinglong/blog-demos 1. AVL tree AVL (Adelson velskii and Landis) trees have equilibrium conditions Binary lookup tree , also known as balanced binary tree. In AVL tree, the height difference between two subtrees of any node is ...

Posted by capbiker on Mon, 18 Apr 2022 23:23:50 +0300

Read the evaluation code of pysot, and watch it better compared with the code!

Evaluation code of pysot 1. Official evaluation code 2. Code reading Content to load The path of prediction results obtained in the test -- tracker_pathDataset name used for evaluation -- datasetTracker name used for evaluation -- tracker_prefix When the track result storage path and the theoretical path are changed because t ...

Posted by Swedie on Mon, 18 Apr 2022 22:55:36 +0300

LeetCode question bank: greedy algorithm

LeetCode notes: greedy algorithm Since the University, I have been learning some algorithms and data structures one after another. At the same time, I also began to brush questions on some platforms and participate in some algorithm competitions, large and small. However, the lack of purposefulness and systematicness of problem brushing at ord ...

Posted by i on Mon, 18 Apr 2022 21:03:31 +0300

[Java design patterns, design patterns and paradigms] structural mode 4: bridging mode

This Blog continues to learn about structural patterns and how to more gracefully layout classes and objects. Structural patterns describe how to combine classes or objects according to a certain layout in order to obtain a better and more flexible structure. Although the object-oriented inheritance mechanism provides the most basic function of ...

Posted by jarcoal on Mon, 18 Apr 2022 18:06:06 +0300