+ 2
What is a binary tree
can someone please explain what a binary tree is and where they are applied in programming
4 Respostas
+ 22
Binary Search Trees / Binary Trees are a data structure in which you have a node of data and two children of that node who also have children, who also have children and so on. They can be applied to use in compilers. During the construction of a parser, you can build a tree. When you enter into the semantical portion of the parser, when the tree has been built, you can traverse the tree and do type checking, and start preparing for intermediate code generation. But thats just one implementation.
+ 14
If every node has at most 2 child nodes, it's called a binary tree.
+ 9
one example for usage would be a Binary Search Tree (BST in short)
one of the properties of BST is that the left child is smaller than the parent node and the right child is bigger
this property makes searching in a BST very fast
https://en.m.wikipedia.org/wiki/Binary_search_tree
+ 1
thanks all of you