Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/neluckoff/binary-tree-in-java
- Owner: neluckoff
- Created: 2021-10-17T19:31:32.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-10-26T13:28:30.000Z (over 3 years ago)
- Last Synced: 2024-11-27T20:37:10.132Z (3 months ago)
- Topics: algorithm, binary, binary-tree, java
- Language: Java
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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.