(PRE IN POST)order


0x08 graphic
Preorder: 20,16,10,7,

11,18,31,25,29,38

Inorder: 7,10,11,16,

18,20,25,29,31,38

Postorder: 7,11,10,18,

16,29,25,38,31,20

Przeglądanie wgłąb(stosy):

38

31

25

38

29

18

11

20

16

16

16

16

16

10

10

7

7

→ 20,31,38,25,29,16,18,10,11,7

Przeglądanie wszerz (kolejki):

20

16

31

31

10

18

10

18

25

38

18

25

38

7

11

25

38

7

11

38

7

11

29

7

11

29

→ 20,16,31,10,18,25,38,7,11,29

void wgłąb(){

stos pomoc = new stos();

wezel w;

pomoc.push(root);

while(!pomoc.isEmpty())

w=pomoc.pop();

system.out.println(w.wartosc);

if(w.lewy !=null)

pomoc.push(w.lewy);

if(w.prawy !=null)

pomoc.push(w.prawy);

}

0x01 graphic



Wyszukiwarka

Podobne podstrony:
Changes in personality in pre and post dialectical behaviour therapy BPD groups A question of self
The Jewish?cade in post
Hollifield, Miller, Sandas And Slive Liquidity Supply And Demand In Limit Order Markets
‘Looking West Youth and cultural globalisation in post Soviet Russia’ Hilary Pilkington
1000 Most Common Words in English in Alphabetical Order
Post feeding larval behaviour in the blowfle Calliphora vicinaEffects on post mortem interval estima
In English Practice Pack Pre intermediate
Increase in pre shock pause caused by drug administration before defibrillation
Luhmann's Progeny Systems Theory and Literary Studies in the Post Wall Era
Pre Processing images in Nebulosity
in company pre intermediate(1)
Post feeding larval behaviour in the blowfle Calliphora vicinaEffects on post mortem interval estima
lyo coupon order pre payment SK
[Rathi & Rastogi] Meaning in life & psychological well being in pre adolescents & adolescents
Post Time in Pink Mike Resnick
Word Order in Questions
Barry Cunliffe, Money and society in pre Roman Britain
Hillary Clinton and the Order of Illuminati in her quest for the Office of the President(updated)

więcej podobnych podstron