Update JavaScript code to docs style (Chapter of Tree)

pull/104/head
justin 2 years ago
parent 2a375ebcbb
commit 07ca137e78

@ -8,9 +8,9 @@
* Definition for a binary tree node.
*/
function TreeNode(val, left, right) {
this.val = (val === undefined ? 0 : val) // 结点值
this.left = (left === undefined ? null : left) // 左子结点指针
this.right = (right === undefined ? null : right) // 右子结点指针
this.val = (val === undefined ? 0 : val); // 结点值
this.left = (left === undefined ? null : left); // 左子结点指针
this.right = (right === undefined ? null : right); // 右子结点指针
}
/**

@ -65,9 +65,9 @@ comments: true
```js title=""
/* 链表结点类 */
function TreeNode(val, left, right) {
this.val = (val === undefined ? 0 : val) // 结点值
this.left = (left === undefined ? null : left) // 左子结点指针
this.right = (right === undefined ? null : right) // 右子结点指针
this.val = (val === undefined ? 0 : val); // 结点值
this.left = (left === undefined ? null : left); // 左子结点指针
this.right = (right === undefined ? null : right); // 右子结点指针
}
```

Loading…
Cancel
Save