Skip to content

Commit

Permalink
Update Tree image.
Browse files Browse the repository at this point in the history
  • Loading branch information
trekhleb committed Jul 27, 2022
1 parent ceb6c85 commit b7017ed
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 13 deletions.
22 changes: 12 additions & 10 deletions src/data-structures/tree/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,26 @@ _Read this in other languages:_
* [Segment Tree](segment-tree) - with min/max/sum range queries examples
* [Fenwick Tree](fenwick-tree) (Binary Indexed Tree)

In computer science, a **tree** is a widely used abstract data
type (ADT) — or data structure implementing this ADT—that
simulates a hierarchical tree structure, with a root value
and subtrees of children with a parent node, represented as
In computer science, a **tree** is a widely used abstract data
type (ADT) — or data structure implementing this ADT—that
simulates a hierarchical tree structure, with a root value
and subtrees of children with a parent node, represented as
a set of linked nodes.

A tree data structure can be defined recursively (locally)
as a collection of nodes (starting at a root node), where
each node is a data structure consisting of a value,
together with a list of references to nodes (the "children"),
with the constraints that no reference is duplicated, and none
A tree data structure can be defined recursively (locally)
as a collection of nodes (starting at a root node), where
each node is a data structure consisting of a value,
together with a list of references to nodes (the "children"),
with the constraints that no reference is duplicated, and none
points to the root.

A simple unordered tree; in this diagram, the node labeled 7 has
two children, labeled 2 and 6, and one parent, labeled 2. The
root node, at the top, has no parent.

![Tree](https://upload.wikimedia.org/wikipedia/commons/f/f7/Binary_tree.svg)
![Tree](./images/tree.jpeg)

*Made with [okso.app](https://okso.app)*

## References

Expand Down
4 changes: 3 additions & 1 deletion src/data-structures/tree/README.pt-BR.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ Uma árvore não ordenada simples; neste diagrama, o nó rotulado como `7`
possui dois filhos, rotulados como `2` e `6`, e um pai, rotulado como `2`.
O nó raíz, no topo, não possui nenhum pai.

![Tree](https://upload.wikimedia.org/wikipedia/commons/f/f7/Binary_tree.svg)
![Tree](./images/tree.jpeg)

*Made with [okso.app](https://okso.app)*

## Referências

Expand Down
6 changes: 4 additions & 2 deletions src/data-structures/tree/README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@

一棵简单的无序树; 在下图中:

标记为7的节点具有两个子节点, 标记为2和6;
标记为7的节点具有两个子节点, 标记为2和6;
一个父节点,标记为2,作为根节点, 在顶部,没有父节点。

![Tree](https://upload.wikimedia.org/wikipedia/commons/f/f7/Binary_tree.svg)
![Tree](./images/tree.jpeg)

*Made with [okso.app](https://okso.app)*

## 参考

Expand Down
Binary file added src/data-structures/tree/images/tree.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit b7017ed

Please sign in to comment.