DEV Community

Cover image for Introduction to tree data structure
Aya Bouchiha
Aya Bouchiha

Posted on • Updated on

Introduction to tree data structure

Hi, on this amazing day! we're going to talk about tree data structure, so let's get started!

Definition of tree

A tree is a nonlinear data structure unlike Stack, Queue, Array, and Linked List, It is a collection of nodes connected with edges

Properties of tree

  • Root: parent node is the first (top) node of the tree.
  • Parent: node has children
  • Child: node has a parent
  • Siblings: nodes have the same parent
  • Leaves: last nodes of the tree
  • Depth: length of edges from a node to the root
  • Height: length of the longest path from a node to a leaf
  • Edge: link two nodes

tree data structure Aya Bouchiha

References and useful resources

#day_13

Top comments (4)

Collapse
 
amboulouma profile image
Amin M. Boulouma • Edited
Collapse
 
ayabouchiha profile image
Aya Bouchiha • Edited

I have very good experience with python, but I am gonna check out this article:)
Thank you Amin

Collapse
 
ayabouchiha profile image
Aya Bouchiha

Have a great day!

Collapse
 
amboulouma profile image
Amin M. Boulouma

You’re most welcome! Thank you !