Skip to content

contains a simple Java implementation of a binary tree with three types of traversal methods: in-order, pre-order, and post-order

License

Notifications You must be signed in to change notification settings

sie-hanamura/BinaryTreeTraversal-Java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

BinaryTreeTraversal-Java

This repository contains a simple Java implementation of a binary tree with three types of traversal methods: in-order, pre-order, and post-order. The program allows users to input numbers to construct the binary tree and then displays the results of each traversal.

Features

  • Binary Tree Structure: Supports inserting nodes and creating a binary search tree.
  • Traversal Methods: Includes in-order, pre-order, and post-order traversal methods.
  • User Input: Users can input a list of numbers, which will be added to the binary tree.

How to Run

  1. Clone the repository:

    git clone https://github.com/your-username/BinaryTreeTraversal-Java.git
    
  2. Open the project in your preferred Java IDE (like VSCode, IntelliJ IDEA, Eclipse, or NetBeans).

  3. Compile and run the Main.java file.

  4. When prompted, enter a list of numbers separated by spaces to build the tree.

  5. The program will output the in-order, pre-order, and post-order traversals of the tree.

About

contains a simple Java implementation of a binary tree with three types of traversal methods: in-order, pre-order, and post-order

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages