Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Binary tree

You have to build a simple binary tree (there can only be a node of this tree in the console or you can plot it with HTML/CSS)

Basic principles:

  • left = smaller
    • for each node
  • right = greater
    • for each node
  • they must work for all integers
  • adding the possibility of adding new values to the tree
  • tree should have that properties
    • each node should have properties
      • "number"
      • "nodeIndex"
      • "left"
      • "right"
    • root node should have properties
      • "valueIndex" (counting how many values were provided after "root" node get it's value)

Helpful links:

What is binary tree


Enjoy

Morty Proxy This is a proxified and sanitized view of the page, visit original site.