Multi school sprint NOIP simulation 27 - Super doubling - reconstruction tree
No link is provided for this question
Title Description
Given a tree. We think one
x
→
y
x\rightarrow y
Simple path of x → y(
x
≠
...
Posted by phpnewbie911 on Wed, 10 Nov 2021 08:11:15 -0800
Judge whether it is a balanced binary tree - js
01 - sum of two numbers - js
describe Given an integer array numbers and a target value target, please find two subscripts in the array that add up to the target value, and the returned subscripts are arranged in ascending order.
Example 1
Input:[3,2,4],6
Return value:[2,3]
Note: because 2+4=6 ,And the subscript of 2 is 2, and the subscrip ...
Posted by sherri on Wed, 10 Nov 2021 08:05:06 -0800
Learning notes: tree chain subdivision
preface
Tree chain subdivision divides the edges of the tree into many chains, so as to reduce the complexity of modifying queries on the tree. This is an introduction to light and heavy chain segmentation. Concept: Heavy son: the son with the most nodes in the subtree. If the subtrees of two sons are the same, then any one of them. Light son: ...
Posted by FuriousIrishman on Wed, 10 Nov 2021 05:51:17 -0800
The ranking algorithm that interviewers like to ask
prefaceAfter a year of self-study, JAVA ABA finally made an appointment for an interview. However, the interviewer asked her to talk about her understanding of sorting algorithm.Interviewer: do you know anything about algorithms? Sort this one, okay?ABBA ABBA: understand that the sorting algorithm mainly includes bubble sort, insert sort, Hill ...
Posted by darf on Wed, 10 Nov 2021 04:59:43 -0800
[LeetCode]13. Roman numeral to integer
Title Description
Roman numerals contain the following seven characters: I, V, X, L, C, D and M.
Character numerical value I 1 V 5 X 10 L 50 C 100 D 500 M 1000
For example, the Roman numeral 2 is written as II, which ...
Posted by Guernica on Wed, 10 Nov 2021 00:35:53 -0800
Java: P1093 [NOIP2007 popularization group] scholarship
Luogu topic: P1093 [NOIP2007 popularization group] scholarship
Title Description
A primary school has recently received a sponsorship and plans to give part of it to the top five students with excellent academic achievements. At the end of the term, each student has three grades: Chinese, mathematics and English. First, sort according to the ...
Posted by miles_rich on Tue, 09 Nov 2021 17:15:22 -0800
Leetcode 488 Zuma games
You are participating in a variant of Zuma game.
In this Zuma game variant, there is a row of colored balls on the desktop. The color of each ball may be red 'R', yellow 'Y', blue 'B', green 'G' or white 'W'. You also have some colored balls in your hand.
Your goal is to empty all the balls on the table. Each round:
Choose any one of the col ...
Posted by wisewood on Tue, 09 Nov 2021 14:21:41 -0800
On the hierarchical traversal of binary tree and the extension of written test questions (data structure)
1, Hierarchical traversal of binary tree
It is unrealistic to traverse directly, because there are more nodes in the future, and not all nodes in each layer are 2k-1. If you traverse a node, save the child of the node and get it from the structure next time. Here, the child is saved in a queue (the node first placed in the space is ...
Posted by jwcsk8r on Tue, 09 Nov 2021 11:38:05 -0800
Palindromes 2021-11-08
Determine whether an integer is palindrome
Title Description: Source: LeetCode 09 palindromes Give you an integer x, if x is a palindrome integer, return true; Otherwise, return false.
Palindrome numbers refer to integers whose positive order (left-to-right) and reverse order (right-to-left) are read the same. For example, 121 is palindrome a ...
Posted by Kol on Tue, 09 Nov 2021 09:09:23 -0800
Chapter V Decision Tree
Decision tree is a basic classification and regression method. This chapter mainly discusses the decision tree for classification. The decision tree model has a tree structure. In the classification problem, it represents the process of classifying instances based on features. It can be considered as a set of if then rules, or as a conditional ...
Posted by achilles on Mon, 08 Nov 2021 23:05:06 -0800