Skip to content

zoumson/BinaryTreeVisualTraversal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

LinkedIn

Binary Tree Visual Traversal: Post order, Pre Order, In Order, Level Order

ezgif com-gif-maker

Table of Contents
  1. About The Project
  2. Files Structure
  3. Getting Started
  4. Usage
  5. Roadmap
  6. Contributing
  7. License
  8. Contact
  9. Acknowledgements

About The Project

Binary Tree Traversal

Built With



File Structure

Folders

Entire Files Structure

.
├── CMakeLists.txt
├── include
│   ├── BinTreeNode.h
│   ├── BinTreeTraversal.h
│   ├── ConstantsColor.h
│   ├── Draw.h
│   └── gif.h
├── README.md
└── src
    ├── Demo.cpp
    └── Draw.cpp

2 directories, 9 files

Getting Started

This is a sample code of how you may use the opencv libs to display binary tree traversal. To get a local copy up and running follow these simple steps.

Prerequisites

This is an example of how to list things you need to use the software and how to install them.

  • cmake

    sudo apt-get install cmake
  • Install gtk and gtk3 module to access canberra-gtk-module used by opencv imshow

    sudo apt install libcanberra-gtk-module libcanberra-gtk3-module
  • opencv4

sudo su
git clone https://github.com/zoumson/OpencvInstall.git     \
&& cd OpencvInstall && chmod +x install.sh && ./install.sh

Installation

  1. Clone the repo
    git clone https://github.com/zoumson/BinaryTreeVisualTraversal.git
  2. Go to the project directory source
    cd BinaryTreeVisualTraversal
  3. Create empty directories build, result and bin
    mkdir build &&  mkdir bin && mkdir result 
  4. Generate the exectutable demo and move it to bin
    cd build && cmake .. && make -j4 && cd ..

Usage

1.Command line options

 Binary Tree Trasversal
 Usage: demo [params] 

   -?, -h, --help, --usage (value:true)
     show help message
   -o, --option (value:4)
     trasversal option, 1-->Post order; 2-->Pre order;3-->In order;4-->Level order;
   -s, --save (value:./result/trasversal)
     trasversal video
  1. Run for Level order traversal
    ./bin/demo -o=4
  2. Output

ezgif com-gif-maker

  1. Back to the initial file structure configuration
    rm -r bin build result

Roadmap

All the headers files are well docummented, read through the comments

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Adama Zouma - - stargue49@gmail.com

Project Link: https://github.com/zoumson/BinaryTreeVisualTraversal

Acknowledgements

Releases

No releases published

Packages

No packages published