Skip to content

Binary Search Tree Creation and Traversal Visualization from given node points using Drawing Algorithm in Java

License

Notifications You must be signed in to change notification settings

pooja5101/Binary-Search-Tree-Traversal

Repository files navigation

Gradle Actions Status

Binary-Search-Tree-Traversal

Binary Search Tree Creation and Traversal Visualization from given node points using Drawing Algorithm in Java

This mini-project was developed for the partial fulfilment of the 2nd year, 4th semester of Bachelor of Technology in Data Structures : CSD-223 by following students:-

Project Resources

  1. The Project Proposal
  2. The Project Report

Get Started with the project

  1. Requirements
    • Java must be installed
    • Gradle to build the project/ Can be build without that too
    • Use IntelliJ IDEA to get started quickly
  2. Try the project without building - Find the latest release in the release section download jar file or the executable.
    • For jar run java -jar Binary-Search-Tree.Traversal.main.jar in terminal or command prompt.
    • Provide a text file containing numbers(An example is given in the repo).
  3. To build this project, clone this repo first.
  git clone https://github.com/avinal/Binary-Search-Tree-Traversal
  1. If you have IntelliJ IDEA installed just open the project and build it the regular way.
  2. Or you may use gradle to build the project
  cd Binary-Search-Tree-Traversal
  ./gradlew build
  1. Run the project
  cd build/classes/java/main
  java Main.class

HighLights of the project

  1. When launched first time the selection menu appears.

    Selection Menu

    • Traversal Options
      • InOrder : Root-Right-Left
      • PreOrder : Right-Root-Left
      • PostOrder : Right-Left-Root
      • LevelOrder : Breadth-First-Traversal
    • Choose File - Choose the text file.
    • Experimental Features
      • Compare Mode - Draw three DFS simultaneously
      • Show Path - Draw the path of traversal
      • Speed Selector - 0.5 second/node to 1.5 second/node
  2. Choose any options from Traversal pane and Choose a File. Given below is an example for sequence 50 34 67 25 38 65 77 15 33.

    Preorder for Sequence

  3. If we choose Show Path feature. Then the different traversals will show as below.

    • Preorder with Show Path

    Preorder with Show Path

    • Inorder with Show Path

    Inorder with Show Path

    • Postorder with Show Path

    Postorder with Show Path

    • Levelorder with Show Path

    Levelorder with Show Path

  4. If Compare Mode is activated then the following figure as snapshot occurs.

    Compare Mode

    The compare mode was developed using multithreading.

  5. Additionally you can set speed by using the slider.

About

Binary Search Tree Creation and Traversal Visualization from given node points using Drawing Algorithm in Java

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages