【文件属性】:
文件名称:leetcode所有报错-show-the-tree:展示树
文件大小:295KB
文件格式:ZIP
更新时间:2021-06-30 23:08:50
系统开源
leetcode
所有报错
用途:辅助leetcode刷题
为什么要做这个网页
有两点:
第一点:leetcode刷题时写测试用例很麻烦,如下
[5,
4,
8,
11,
null,
13,
4,
7,
2,
null,
null,
null,
1]表示一个二叉树
5
/
\
4
8
/
/
\
11
13
4
/
\
\
7
2
1
写测试用例需要写如下代码
var
a
=
new
TreeNode(5);
var
b
=
new
TreeNode(4);
var
c
=
new
TreeNode(8);
var
d
=
new
TreeNode(11);
var
e
=
new
TreeNode(13);
var
f
=
new
TreeNode(4);
var
g
=
new
TreeNode(7);
var
h
=
new
TreeNode(2);
var
i
=
new
TreeNode(1);
a.left
=
b;
a.right
=
c;
b.left
=
d;
c.left
=
e;
c.right
=
f;
d.left
=
g;
d.right
=
h
【文件预览】:
show-the-tree-master
----package.json(780B)
----package-lock.json(558KB)
----src()
--------css()
--------App.css(561B)
--------index.js(513B)
--------demo.json(0B)
--------serviceWorker.js(5KB)
--------App.test.js(280B)
--------setupTests.js(255B)
--------components()
--------App.js(206B)
--------index.css(366B)
----.gitignore(310B)
----public()
--------manifest.json(190B)
--------robots.txt(67B)
--------index.html(2KB)
--------beian.png(19KB)
----README.md(2KB)
----yarn.lock(467KB)