Skip to content

pashaproton/binary-tree

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

Binary Tree

There are examples in different languages of binary tree implementation.

C | C++ | PHP | Python | JavaScript


Each implementation contains next functions or methods depends on language paradigm:

  • Depth first values - explore the nodes of the tree, starting from a root node, and it returns a list of node values in the order they were visited.
  • Breath first Values - visiting all root immediate children before moving on to their children, and so on.
  • Tree Includes - checks whether a given value exists within a binary tree.
  • Tree Sum - The "Tree Sum" function calculates the sum of all the values stored in the nodes of a binary tree.
  • Tree Min Value - finds the minimum value.
  • Max Root to Leaf Path Sum - calculates the maximum sum that can be obtained by following a path from the root node to any leaf node in a binary tree.

Examples

Each example has run.sh file which can be run by sh run.sh command. Files structure and names are the same for every language, difference in implementation only.

Contributing and Issues

  • If you see a bug in the code please add new issue bugs with label bug.
  • Do not hesisate add new ideas with label proposal.
  • Feel free fork the project or add new ideas.

About

Example of the binary tree in different languages

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors