mirror of
https://github.com/krahets/hello-algo.git
synced 2026-11-10 16:00:36 +08:00
Retranslate the complete English edition from Simplified Chinese (#2010)
* Retranslate the complete English edition from Simplified Chinese * Polish three English explanations after reader-focused review
This commit is contained in:
@@ -12,19 +12,19 @@ import java.util.*;
|
||||
public class TreeNode {
|
||||
public int val; // Node value
|
||||
public int height; // Node height
|
||||
public TreeNode left; // Reference to left child node
|
||||
public TreeNode right; // Reference to right child node
|
||||
public TreeNode left; // Reference to the left child
|
||||
public TreeNode right; // Reference to the right child
|
||||
|
||||
/* Constructor */
|
||||
public TreeNode(int x) {
|
||||
val = x;
|
||||
}
|
||||
|
||||
// For the serialization encoding rules, please refer to:
|
||||
// https://www.hello-algo.com/chapter_tree/array_representation_of_tree/
|
||||
// Array representation of binary tree:
|
||||
// For the serialization rules, see:
|
||||
// https://www.hello-algo.com/en/chapter_tree/array_representation_of_tree/
|
||||
// Array representation of the binary tree:
|
||||
// [1, 2, 3, 4, None, 6, 7, 8, 9, None, None, 12, None, None, 15]
|
||||
// Linked list representation of binary tree:
|
||||
// Linked representation of the binary tree:
|
||||
// /——— 15
|
||||
// /——— 7
|
||||
// /——— 3
|
||||
|
||||
Reference in New Issue
Block a user