Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/neluckoff/binary-tree-in-java

A perfectly balanced binary tree in Java
https://github.com/neluckoff/binary-tree-in-java

algorithm binary binary-tree java

Last synced: 17 days ago
JSON representation

A perfectly balanced binary tree in Java

Awesome Lists containing this project

README

        

# Binary-Tree-in-Java
A perfectly balanced binary tree in Java
____
**[RU] Задание**

Создать идеально сбалансированное бинарное дерево из n узлов.
Структура узла дерева включает: информационная часть узла, указатель на левое и указатель на правое поддерево.
Отобразить дерево на экране, повернув его справа налево.
1. Определить высоту дерева
2. Определить длину пути дерева (количество ребер), используя алгоритм прямого обхода
3. Вычисляет среднее арифметическое всех чисел в дереве.
____
**[ENG] Task**

Create a perfectly balanced binary tree of n nodes.
The tree node structure includes: the information part of the node, a pointer to the left and a pointer to the right subtree.
Display the tree on the screen by rotating it from right to left.
1. Determine the height of the tree
2. Determine the path length of a tree (number of edges) using the forward traversal algorithm
3. Calculates the arithmetic average of all numbers in a tree.