This project provides functions to print a binary tree in DOT and JSON formats. It includes unit tests using Google Test to verify the functionality of the tree traversal and printing functions.
Before you begin, ensure you have the following installed on your system:
- CMake (version 3.10 or higher)
- GCC or Clang compiler
- Git
-
Clone the repository:
git clone https://github.com/rghouzra/BinaryTreeVisualizer.git cd print_btree_in_dot_format
-
Create a build directory:
mkdir build cd build
-
Run CMake:
cmake ..
-
*Run Make:
make
-
Run the tests:
ctest --output-on-failure
-
Run the executable:
./print_tree
-
**Copy the output
#for dot formats
paste the output in https://dreampuf.github.io/GraphvizOnline/
#for json formats
paste the output in https://jsonformatter.org/json-viewer