We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 41c32d8 commit d59c314Copy full SHA for d59c314
KnLfVT/index.ts
@@ -0,0 +1,15 @@
1
+import { TreeNode } from "../binary-tree-inorder-traversal/TreeNode.ts";
2
+
3
+export default function expandBinaryTree(
4
+ root: TreeNode | null,
5
+): TreeNode | null {
6
+ return root
7
+ ? new TreeNode(
8
+ root.val,
9
+ root.left ? new TreeNode(-1, expandBinaryTree(root.left)) : null,
10
+ root.right
11
+ ? new TreeNode(-1, null, expandBinaryTree(root.right))
12
+ : null,
13
+ )
14
+ : null;
15
+}
README.md
@@ -45,6 +45,8 @@ Step 2. Add the dependency
45
46
<summary>展开查看</summary>
47
48
+https://leetcode.cn/problems/KnLfVT/
49
50
https://leetcode.cn/problems/letter-case-permutation/
51
52
https://leetcode.cn/problems/count-items-matching-a-rule/
0 commit comments