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

Force buckle 566 Remodeling matrix - C language implementation - simple questions

subject Portal In MATLAB, there is a very useful function reshape, which can reshape a matrix into another new matrix of different sizes, but retain its original data. A matrix represented by a two-dimensional array and two positive integers r and c are given to represent the number of rows and columns of the matrix to be reconstructed res ...

Posted by dipenmistry on Mon, 18 Apr 2022 15:25:30 +0300

Daily practice - day 1 -3.18

catalogue IT cold knowledge Browser war New era of browser Composition of programming art c/c++ Even or odd Different paths II Python Distribute candy IT cold knowledge Browser war In 1995, in order to defeat the skyrocketing Netscape browser, Microsoft launched a work of accurately copying and sniping Netscape browser. The brows ...

Posted by Miker on Mon, 18 Apr 2022 08:46:22 +0300

Sort insert sort: simple insert sort and Hill sort

Simple insert sort Start from the second element of the array and compare it forward in turn. If the previous element is large, move it back. Repeat array length - 1 round. The working principle is to build an ordered sequence, scan the unordered data from back to front in the sorted sequence, find the corresponding position and insert it. Algo ...

Posted by don_s on Sun, 17 Apr 2022 21:23:02 +0300

leetcode -- evaluation of inverse Polish expression

1, Problem description Find the value of the expression according to the inverse Polish representation. Valid operators include +, -, *, /. Each operand can be an integer or another inverse Polish expression. Note: integer division only retains the integer part; The given inverse Polish expression is always valid. In other words, an expressio ...

Posted by gatoruss on Sun, 17 Apr 2022 17:47:56 +0300

String and generalized table

strand (1) String is a finite sequence of zero or more characters, also known as string. The value of a string can be a number, letter, or other character. (2) The number of characters in the string is called the length of the string, and the string with zero characters is called an empty string with a length of 0 (3) The subsequence composed o ...

Posted by abhishekphp6 on Sun, 17 Apr 2022 16:26:11 +0300

11 week training dp and search Anthology

1.P2758 edit distance Linear dp The main difficulty of this problem is how to convert these three steps into state transition. First, we determine the state first, because there are two strings to match. First, we will think of the longest common subsequence problem. Because a main string a needs to be matched into b, then each substring of ...

Posted by seontay on Sun, 17 Apr 2022 12:26:52 +0300