Binary tree OJ questions (check whether two numbers are the same, subtree of another tree, flip binary tree, determine balanced binary tree, symmetric binary tree)

Article directory Binary tree OJ question 1. Check whether the two numbers are the same 1. Ideas 2. Problem solving steps 3.Code 2. A subtree of another tree 1. Ideas 2.Code 3. Flip the binary tree 1. Ideas 2. Problem solving steps 3.Code 4. Judgment of Balanced Binary Tree 1. Ideas 2.Code 5. Symmetric binary […]

20.2 OpenSSL asymmetric RSA encryption and decryption algorithm

The RSA algorithm is an asymmetric encryption algorithm jointly invented by three mathematicians Rivest, Shamir and Adleman, named after them. Named with initials. The security of the RSA algorithm is based on the large number decomposition problem, that is, for a very large composite number, it is very difficult to decompose it into the product […]

Determine whether a binary tree is symmetrical

Table of Contents Problem-solving ideas Macro definition Binary tree definition Implement function test code Test Results Title description Design an algorithm to determine whether a binary tree is symmetrical. Source: 2022 Northeastern University Software Engineering 858 Postgraduate Entrance Exam Question 2 Problem-solving ideas Method 1 (clever) Using hierarchical traversal, first enqueue the left child and […]

PHP asymmetric and symmetric two-way encryption and decryption methods

Table of Contents RSA asymmetric encryption and decryption: What is RSA asymmetric encryption and decryption analysis: Analysis: Why use: What are the advantages: DEMO: Symmetric encryption and decryption such as AES, DES, 3DES: Analysis: Why use: What are the advantages: DEMO: RSA asymmetric encryption and decryption: What is RSA asymmetric encryption and decryption analysis: Analysis: […]

06|Symmetric key: How to protect private data?

In the previous module, we learned about one-way hash functions. Starting today, we will open a new module, in which I will discuss with you the relevant knowledge of encryption technology. Do you feel that you still have more to learn from the previous module? Don’t worry, one-way hash functions will still appear in our […]

A preliminary study on quantization: symmetric quantization and asymmetric quantization

1. The definition and benefits of quantification Quantization refers to the process of representing high-precision floating point numbers into low-precision integers, thereby improving the efficiency and performance of neural networks. When a certain loss of accuracy is acceptable, the following benefits can be achieved: Reduce memory usage Model size reduction: Through quantization, we can convert […]

TLS/SSL (6) Asymmetric cryptography application PKI certificate system

1 PKI certificate system Concepts: ‘PKI’, ‘CA’, ‘Digital Certificate’, ‘Certificate Chain’, ‘Digital Signature’ The public key explained before is different from the certificate obtained by the https site. The public key is only a part of the information of the digital certificate. Note: The following content is only as a “personal” note Huawei Cloud Certificate […]

D15 (Binary tree 02 level-order traversal, pre- and post-order recursion) level-order traversal*10 226. Flip binary tree 101. Symmetric binary tree

Table of Contents Layer sequential traversal*10 102. Level-order traversal of binary tree Sequence iteration preorder recursion 107. Level-order traversal of binary trees II 199. Right view of binary tree 637. Level average of binary tree 429. Level-order traversal of N-ary tree 515. Find the maximum value in each tree row 116. Populate the next right […]

[Algorithm Training – Binary Tree 4] [Symmetry and Flip] Symmetric Binary Tree, Flip Binary Tree

Without further ado, just shout a slogan to encourage yourself: Programmers will never be unemployed, programmers go to architecture! The theme of this blog is [morphological changes of binary trees], which is implemented using the basic data structure [binary tree]. The website for this high-frequency question is: CodeTop, and the filtering conditions are: Target company […]