Skip to content

This Java implementation represents a Binary Tree, a data structure where each node has at most two children, typically referred to as the left and right children. The binary tree is built around a root node that serves as the starting point for traversing the entire tree.

Notifications You must be signed in to change notification settings

Syktox/Binary_Tree

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 

Repository files navigation

BinaryTree Functions implementation

Insert

  • insert: Iterative insertion of a new node.
  • insertRec: Recursive insertion of a new node.

Search

  • search: Iterative search for a node with a specific value.
  • searchRec: Recursive search for a node with a specific value.

Postorder Traversal

  • postorder: (Not implemented)
  • postorderRec: Rekursive postorder traversal

Preorder Traversal

  • preorder: Iterative preorder traversal.
  • preorderRec: Recursive preorder traversal.

Inorder Traversal

  • inorder: Iterative inorder traversal.
  • inorderRec: Recursive inorder traversal.

Delete

  • delete: Deletes a node with a specific value from the binary tree.

TreeToVine

  • TreeToVine: Converts the binary tree into a vine (right-skewed binary tree) and returns the count of operations performed.

Compress

  • compress: Helper function used in VineToTree to compress the vine.

VineToTree

  • VineToTree: Converts the vine (right-skewed binary tree) back into a balanced binary tree.

isComplete

  • isComplete: Checks if the binary tree is complete.

About

This Java implementation represents a Binary Tree, a data structure where each node has at most two children, typically referred to as the left and right children. The binary tree is built around a root node that serves as the starting point for traversing the entire tree.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages