-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cc
More file actions
29 lines (24 loc) · 649 Bytes
/
main.cc
File metadata and controls
29 lines (24 loc) · 649 Bytes
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
#include <string>
#include "matrix_funcs.h"
#include "treenode_funcs.h"
#include "treenode.h"
#include "txt_to_treenode.h"
#include "txt_to_vecvec.h"
void TreeNodeExample() {
using T = int;
const std::string txt_list{ "[4,1,6,0,2,5,7,null,null,null,3,null,null,null,8]" };
TreeNode<T>* root{ Txt2TreeNode<T>(txt_list) };
PrintTreeNode(root);
DeleteTreeNode(root);
}
void VectorVectorExample() {
using T = int;
const std::string txt_mtx{ "[[1,1,0],[0,1,0],[0,1,0]]" };
std::vector<std::vector<T>> vecvec{ Txt2VecVec<T>(txt_mtx) };
PrintVecVec(vecvec);
}
int main() {
TreeNodeExample();
VectorVectorExample();
return 0;
}