-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
64 lines (54 loc) · 903 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
import Vue from './lib/vue.js'
import {
quickSort,
divided
} from './lib/sort.js';
import {
stack,
queue,
link,
dbLinkList,
CricleDoubleLinkList,
BinaryTree
} from './lib/structures';
import 'babel-polyfill';
import { timingSafeEqual } from 'crypto';
new Vue({
el:document.querySelector('#root'),
data(){
return {
time: 0,
arr: [1,2,3,4,5],
ms: 3000
}
},
mounted() {
const BST = new BinaryTree();
window.db = BST;
BST.insert(11);
BST.insert(7);
BST.insert(15);
BST.insert(5);
BST.insert(9);
BST.insert(13);
BST.insert(20);
BST.insert(3);
BST.insert(6);
BST.insert(8);
BST.insert(10);
BST.insert(12);
BST.insert(14);
BST.insert(18);
BST.insert(25);
// BST.postOrderTraverse((e)=>{
// console.log(e);
// });
console.log(
BST.remove(7)
);
},
created(){
window.app = this;
console.log('i am created');
}
})