mirror of
				https://github.com/krahets/hello-algo.git
				synced 2025-11-04 14:18:20 +08:00 
			
		
		
		
	fix: correct comment translation in binary_tree.md (#1406)
This commit is contained in:
		@ -57,7 +57,7 @@ A <u>binary tree</u> is a non-linear data structure that represents the hierarch
 | 
				
			|||||||
        Left  *TreeNode
 | 
					        Left  *TreeNode
 | 
				
			||||||
        Right *TreeNode
 | 
					        Right *TreeNode
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    /* 构造方法 */
 | 
					    /* Constructor */
 | 
				
			||||||
    func NewTreeNode(v int) *TreeNode {
 | 
					    func NewTreeNode(v int) *TreeNode {
 | 
				
			||||||
        return &TreeNode{
 | 
					        return &TreeNode{
 | 
				
			||||||
            Left:  nil, // Pointer to left child node
 | 
					            Left:  nil, // Pointer to left child node
 | 
				
			||||||
@ -141,7 +141,7 @@ A <u>binary tree</u> is a non-linear data structure that represents the hierarch
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    impl TreeNode {
 | 
					    impl TreeNode {
 | 
				
			||||||
        /* 构造方法 */
 | 
					        /* Constructor */
 | 
				
			||||||
        fn new(val: i32) -> Rc<RefCell<Self>> {
 | 
					        fn new(val: i32) -> Rc<RefCell<Self>> {
 | 
				
			||||||
            Rc::new(RefCell::new(Self {
 | 
					            Rc::new(RefCell::new(Self {
 | 
				
			||||||
                val,
 | 
					                val,
 | 
				
			||||||
@ -158,12 +158,12 @@ A <u>binary tree</u> is a non-linear data structure that represents the hierarch
 | 
				
			|||||||
    /* Binary tree node */
 | 
					    /* Binary tree node */
 | 
				
			||||||
    typedef struct TreeNode {
 | 
					    typedef struct TreeNode {
 | 
				
			||||||
        int val;                // Node value
 | 
					        int val;                // Node value
 | 
				
			||||||
        int height;             // 节点高度
 | 
					        int height;             // Node height
 | 
				
			||||||
        struct TreeNode *left;  // Pointer to left child node
 | 
					        struct TreeNode *left;  // Pointer to left child node
 | 
				
			||||||
        struct TreeNode *right; // Pointer to right child node
 | 
					        struct TreeNode *right; // Pointer to right child node
 | 
				
			||||||
    } TreeNode;
 | 
					    } TreeNode;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /* 构造函数 */
 | 
					    /* Constructor */
 | 
				
			||||||
    TreeNode *newTreeNode(int val) {
 | 
					    TreeNode *newTreeNode(int val) {
 | 
				
			||||||
        TreeNode *node;
 | 
					        TreeNode *node;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user