leetcode_987. Vertical traversal of binary tree -- leetcode's way to brush questions
Title Description
Give you the root node of the binary tree, root. Please design an algorithm to calculate the vertical traversal sequence of the binary tree.
For each node located in (row, col), its left and right child nodes are located in (row + 1, col - 1) and (row + 1, col + 1). The root node of the tree is located at (0, 0).
The ve ...
Posted by Stopofeger on Sat, 01 Jan 2022 16:28:42 +0100
Binary search tree
Binary search tree concept
Binary search tree is also called binary sort tree. It is either an empty tree or a binary tree with the following properties: If its left subtree is not empty, the values of all nodes on the left subtree are less than those of the root node If its right subtree is not empty, the values of all nodes on the right ...
Posted by jossejf on Sat, 01 Jan 2022 14:42:12 +0100
Data structure course design: quick sorting
Problem Description:
For the linear table stored in order (assuming that the order table is not empty), use vector or array to realize the quick sorting algorithm and output the sorting results of each trip.
Reference function prototype: (vector version)
(1) / / implementation of quick sort (shell)
template<class ElemType>
voi ...
Posted by brmcdani on Sat, 01 Jan 2022 10:16:20 +0100
Supplementary questions for the fifth session of 2021 Niuke multi school
B-Boxes
Link: https://ac.nowcoder.com/acm/contest/11256/B Source: niuke.com Ā
Title Description
There're nn_{}nā boxes in front of you. You know that each box contains a ball either in white or in black. The probability for a ball to be white is 12\frac{1}{2}21ā, and the colors of balls are independent of each other. The PJ King invites you ...
Posted by evildj on Sat, 01 Jan 2022 01:22:36 +0100
2021 "MINIEYE Cup" Chinese college students algorithm design super league part of the problem solution
C.VC Is All You Need
meaning of the title Here you are
n
n
n points at
k
k
On the k dimension, judge whether you can use
...
Posted by genius on Fri, 31 Dec 2021 21:14:54 +0100
The most complete and strongest number guessing game in history
This article is completely original!!!!!
This article is completely original!!!!!
This article is completely original!!!!!
If similar, please contact the author
catalogue
preface
Code list
Code analysis
summary
preface
I haven't updated my blog because of the end of the school term. It has been more than a month since the last blog ...
Posted by scrappy1855 on Fri, 31 Dec 2021 17:23:10 +0100
leetcode algorithm problem brushing report (calculation of date)
catalogue
š» Methods used this time
Ā š¤·āāļø first leap year determination
š¤·āāļø second effectively handles Runping year
š third # day period comparison days
š¹ Problems and Solutions
Ā š§ Topic 1
Ā š Topic 2
Ā š¶ Topic 3
Ā
š» Methods used this time
Ā
Ā š¤·āāļø first leap year determi ...
Posted by hawleyj on Fri, 31 Dec 2021 14:42:43 +0100
3 personal training summary
Red wine competition Title A: Title Link: Click here to transfer
Meaning: Given n non decreasing numbers, you are required to change a bit of a number so that it does not form a non decreasing sequence. If Impossible cannot be output Idea: For simulation, enumerating two adjacent numbers is still legal if the first bit of the previous number ...
Posted by FredAt on Fri, 31 Dec 2021 14:14:47 +0100
[Python] NBA regular season team ranking based on competition chart method
background
At present, the teams in the NBA regular season are ranked according to the winning rate from high to bottom. This ranking method is very simple and easy to be generally accepted by the public. However, due to the asymmetric cycle of NBA regular season competition system, such ranking rules are not completely fair. Therefore, this p ...
Posted by rharden on Fri, 31 Dec 2021 07:38:34 +0100
[improve] find the prime number in N by sieve method
title: [improve] use the sieve method to find the prime number in N date: author: galileocat img: https://cdn.jsdelivr.net/gh/QiYi92/ImageHost/img/202108051426453.png top: false cover: false coverImg: password: toc: false mathjax: false summary: Blue Bridge Cup improved categories: Blue Bridge Cup tags:
Blue Bridge CupPython
Title 1084: fin ...
Posted by deesse on Fri, 31 Dec 2021 02:14:21 +0100