A small app which provides correct traversal pattern using animation based on the selected traversal type. Currently, supported traversal types are Breadth-First, Pre-order, In-order and Post-order. Green or red color will be filled if node is visited or selected respectively. Note: The tree is static, dynamic tree is not supported as of now.
- A reference have been taken from this example to build the static vertical tree diagram.
- Download and install node's latest version based on your system from here
- Install npm package manager
- Clone the project
- Under the root (tree-traversal) directory run
npm install
- All the required packages for this app have been listed under package.json file, some of them are needs to be installed menually and some of them come while creating app with create-react-app
- Menually needs to be installed includes-
- d3
- jquery
- Rest of them come while creating app
- Fourth point under Getting started will install all the required packages
- Under the root (tree-traversal) directory run
npm start
- The app will be accessible at localhost:3000
- Under the root (tree-traversal) directory run
npm run build
- Above command will create build of the app and put it inside build directory which can be found inside root directory of the app
- You can keep build directory as it is or you can move it anywhere else
- Install serve to run the build by running command
npm install -g serve
- Go to build directory and run
serve -s .
or go to parent directory of build and runserve -s build