Skip to content

rghouzra/BinaryTreeVisualizer

Repository files navigation

Print Tree

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.

Table of Contents

Prerequisites

Before you begin, ensure you have the following installed on your system:

  • CMake (version 3.10 or higher)
  • GCC or Clang compiler
  • Git

Installation

  1. Clone the repository:

    git clone https://github.com/rghouzra/BinaryTreeVisualizer.git
    cd print_btree_in_dot_format
  2. Create a build directory:

    mkdir build
    cd build
  3. Run CMake:

    cmake ..
  4. *Run Make:

    make
  5. Run the tests:

    ctest --output-on-failure

vizualization

  1. Run the executable:

    ./print_tree
  2. **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

About

print a binary tree in dot/json format

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published