leetcode

1. Title information 1.1 Title Description Title link: 138. Copy a chain table with a random pointer Give you a chain list of length n, each node containing an additional random pointer to any node in the chain or to an empty node. Construct a deep copy of this list.The deep copy should consisUTF-8...

Posted by **crackerjax** on *Fri, 23 Jul 2021 02:50:36 +0930*

1, Title Here's an n A rooted tree of nodes with node numbers from 0 reach n - 1 . The number of each node represents the unique gene value of the node ( That is to say, node X The gene value of is x). Gene difference of two gene values It's the XOR sum of the two . Here's an array of integersUTF-8...

Posted by **scarlson** on *Fri, 23 Jul 2021 03:50:27 +0930*

Title Description: given two strings S and T, when they are input into the blank text editor respectively, judge whether they are equal and return the result# Represents a backspace character. Note: if you enter a backspace character for empty text, the text continues to be empty. Example 1: InUTF-8...

Posted by **reagent** on *Mon, 26 Jul 2021 02:34:23 +0930*

Characteristic of heap: Complete binary tree + parent node value is greater than child node Important properties of a complete binary tree: If the nodes of a complete binary tree are entered into an array in the order in which they are traversed in sequence, then the index of any child and parUTF-8...

Posted by **pfchin** on *Tue, 27 Jul 2021 04:04:14 +0930*

sort Bubble sorting Swap in pairs and move the maximum value to the back in turn #include #include #include #include #include #include using namespace std; void busort(vector& arr) { for (int i = 0; i < arr.size(); i++) { for (int j = 1; j UTF-8...

Posted by **krishnam1981** on *Wed, 28 Jul 2021 08:15:59 +0930*

Merge Sort thought There are two main points in merging and sorting, one is division and the other is treatment. If the size of the array is 1, we think it's ordered Min: Split a large array into two arrays and continue to split until the size of the array is 1 Cure: Sort the split arrays. CurUTF-8...

Posted by **cshaul** on *Wed, 28 Jul 2021 09:19:31 +0930*

1104. Binary tree routing One question per day on July 29, 2021 Title Description In an infinite binary tree, each node has two child nodes, and the nodes in the tree are marked in zigzag line by line. As shown in the figure below, in odd rows (i.e., the first row, the third row, the fifth row.UTF-8...

Posted by **bsfischer** on *Sat, 31 Jul 2021 01:44:40 +0930*

1. Title There is a questionnaire consisting of n questions, and the answer to each question is either 0 (no, no) or 1 (yes, yes). The questionnaire was distributed to m students and M mentors with numbers ranging from 0 to m-1.The student's answer is represented by a two-dimensional integer aUTF-8...

Posted by **eneyas** on *Sun, 01 Aug 2021 08:15:25 +0930*

Hello, I'm magic smile. Here's the sliding window algorithm problem I shared. I've worked on this problem for a long time. After writing it, I get leetCode to verify it, and then correct it again and again. It's really not easy. Finally, it's submitted successfully. If it's helpful to you, pleaUTF-8...

Posted by **pbalsamo** on *Mon, 02 Aug 2021 08:50:52 +0930*

Interview question 45: arrange the array into the smallest number Enter an array of positive integers, put all the numbers in the array together to form a number, and print the smallest of all the numbers that can be spliced. A sort rule is customized here. class Solution { public: static int MUTF-8...

Posted by **bugsuperstar37** on *Tue, 03 Aug 2021 09:49:49 +0930*