Documente Academic
Documente Profesional
Documente Cultură
Stiva
Coada
STIVA
Structura de tip stiva:
Structura de date logica: implementarea este fcut
utiliznd alte structuri de date;
Structura de date omogena: toate elementele sunt de
acelai tip;
Dou operaii de baz: adugarea i extragerea unui
element;
Disciplina de acces: LIFO-Last In First Out - toate
inserrile (push) i extragerile (pop) sunt fcute la unul
din capetele structurii de implementare, denumit
vrful stivei.
http://www.acs.ase.ro
http://www.itcsolutions.eu
STIVA
push
pop
Mecanismul de stiva
http://www.acs.ase.ro
http://www.itcsolutions.eu
COADA
Structura de tip coada:
Structura de date logica: implementarea este fcut
utiliznd alte structuri de date;
Structura de date omogena: toate elementele sunt de
acelai tip;
Dou operaii de baz: adugarea i extragerea unui
element;
Disciplina de acces: FIFO-Firts In First Out - toate
inserrile (put) se fac la un capat (inceputul cozii) i
extragerile (get) sunt fcute la celalalt capat (sfarsitul
cozii).
http://www.acs.ase.ro
http://www.itcsolutions.eu
COADA
put
get
Mecanismul de coad
http://www.acs.ase.ro
http://www.itcsolutions.eu
http://www.acs.ase.ro
http://www.itcsolutions.eu
64 99 93 49 72 20
64 99 93 49 72 20
Se interschimba 13 cu 9.
9
85 25 13 64 99 93 49 72 20
85 25 13 64 99 93 49 72 20
Se interschimba 85 cu 13.
9
13 25 85 64 99 93 49 72 20
13 25 85 64 99 93 49 72 20
11
13 25 85 64 99 93 49 72 20
13 25 85 64 99 93 49 72 20
Se interschimba 25 cu 20.
9
13 20 85 64 99 93 49 72 25
13
13 20 85 64 99 93 49 72 25
Se interschimba 25 cu 85.
9
13 20 25 64 99 93 49 72 85
14
13 20 25 64 99 93 49 72 85
15
13 20 25 64 99 93 49 72 85
http://www.acs.ase.ro
http://www.itcsolutions.eu
16
http://www.acs.ase.ro
http://www.itcsolutions.eu
17
18
http://www.acs.ase.ro
http://www.itcsolutions.eu
19
http://www.acs.ase.ro
http://www.itcsolutions.eu
20
21
Ierarhie
1
2
3
4
Ierarhia operatorilor
http://www.acs.ase.ro
http://www.itcsolutions.eu
22
Expresia n forma
polonez (scriere
prefixat)
+45
+4*55
+*423
++423
*4+23
Expresia n forma
polonez invers
(scriere postfixat)
45+
455*+
42*3+
42+3+
423+*
http://www.acs.ase.ro
http://www.itcsolutions.eu
23
http://www.acs.ase.ro
http://www.itcsolutions.eu
24
http://www.acs.ase.ro
http://www.itcsolutions.eu
25
26
27
http://www.acs.ase.ro
http://www.itcsolutions.eu
28