際際滷

際際滷Share a Scribd company logo
DATA STRCUTURE
D AY 5
BY : M O H A M M E D E L S D O D Y
BINARY TREE
 Trees: Unlike Arrays, Linked Lists, Stack and queues, which are linear data structures,
trees are hierarchical data structures.
BINARY TREE
Tree Vocabulary: The topmost node is called root of the tree. The elements that are
directly under an element are called its children. The element directly above something
called its parent. For example, a is a child of f, and f is the parent of a. Finally,
elements with no children are called leaves.
WHY TREES ?
 One reason to use trees might be because you want to store information that naturally
forms a hierarchy. For example, the file system on a computer:
TREES ACCESS/SEARCH
 Trees provide access/search (quicker than Linked List and slower than arrays).
TREES INSERTION/DELETION
 Trees provide insertion/deletion (quicker than Arrays and slower than Unordered
Linked Lists).
MAIN APPLICATIONS OF TREES :
 Manipulate hierarchical data.
 Router algorithms.
 Make information easy to search (see tree traversal).

More Related Content

Data structure day5

  • 1. DATA STRCUTURE D AY 5 BY : M O H A M M E D E L S D O D Y
  • 2. BINARY TREE Trees: Unlike Arrays, Linked Lists, Stack and queues, which are linear data structures, trees are hierarchical data structures.
  • 3. BINARY TREE Tree Vocabulary: The topmost node is called root of the tree. The elements that are directly under an element are called its children. The element directly above something called its parent. For example, a is a child of f, and f is the parent of a. Finally, elements with no children are called leaves.
  • 4. WHY TREES ? One reason to use trees might be because you want to store information that naturally forms a hierarchy. For example, the file system on a computer:
  • 5. TREES ACCESS/SEARCH Trees provide access/search (quicker than Linked List and slower than arrays).
  • 6. TREES INSERTION/DELETION Trees provide insertion/deletion (quicker than Arrays and slower than Unordered Linked Lists).
  • 7. MAIN APPLICATIONS OF TREES : Manipulate hierarchical data. Router algorithms. Make information easy to search (see tree traversal).