Skip to content

Commit

Permalink
Everyting looks fine
Browse files Browse the repository at this point in the history
  • Loading branch information
spirosmaggioros committed Jul 26, 2024
1 parent c465532 commit 32f1749
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@
build/

# cache folder
.cache/
.cache/
18 changes: 18 additions & 0 deletions examples/tree/tree.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#include "../../src/classes/tree/tree.h"

int main() {
tree<int> t;
t.insert("", 10);
t.insert("r", 15);
t.insert("l", 20);
t.insert("rr", 13);
t.insert("rrr", 12);
t.insert("rrl", 11);

std::vector<int> ino = t.inorder();
for(auto & x : ino){
std::cout << x << " ";
}
std::cout << '\n';
t.visualize();
}
7 changes: 7 additions & 0 deletions examples/tree/unnamed.dot
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
digraph Tree {
10->20
10->15
15->13
13->11
13->12
}

0 comments on commit 32f1749

Please sign in to comment.