1 / 5

Arbori binari

Arbori binari. Model de proiect. Defini ţie.

sherri
Télécharger la présentation

Arbori binari

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Arboribinari Model de proiect

  2. Definiţie • Un arbore binareste un arbore în care fiecare nod are gradulcelmult 3, adicăfiecare nod are celmult 2 fii. Arboriibinari au şi o definiţierecursivă : - un arbore binareste fie vid, fie format dintr-o rădăcină Rşidoisubarbori, numiţisubarborestâng Sşirespectivsubarboredrept D. • Se face întotdeauna o distincţieclarăîntreceidoisubarbori. Dacăsubarborelestâng S estenevid, rădăcinalui se numeştefiulstâng al rădăcinii R. Analog, dacăsubarboreledrept D estenevid, rădăcinaluiestefiuldrept al rădăcinii R.

  3. Arbore binar • Reprezentarea arborelui: • h=3, niveluri=4 RSD: 1 2 4 6 5 7 8 3 SRD: 6 4 2 7 5 8 1 3 SDR: 6 4 7 8 5 2 3 1

  4. Forma poloneză Expresia aritmetică: E= a*(b+c)/(d–e) forma poloneză prefixată: fpp= / * a + b c - d e forma poloneză postfixată: fpt=a b c + * d e - /

More Related