Friday, May 15, 2009

Data Structure - Assignment Solution by VUsolutions

SYMBOL

POSTFIX

STACK

3

3

3

2

3 2

+

3 2 ↑

+

5

3 2↑5

+

*

3 2↑5

+ *

4

3 2↑5 4

+ *

3 2↑ 5 4

+ *↑

3

3 2↑5 4 3

+ *↑

-

3 2↑5 4 3↑*+

-

18

3 2↑5 4 3↑*+18

-

/

3 2↑5 4 3↑*+18 9

-/

9

3 2↑5 4 3↑*+18 9/-

INPUT

OPERAND1

OPERAND2

VALUE

STACK

3

3

2

3 2

3

2

9

9

5

95

4

9 5 4

3

9 5 4 3

4

3

64

9 5 64

*

5

64

320

9 320

+

9

320

329

329

19

329 18

9

329 19 9

/

18

9

2

329 2

-

329

2

327

327

2)

Indorder:

1,2,3,4,5,6,7,8,9,10,11,12,13,14,18

Postorder:

2,1,6,7,9,8,5,11,10,12,4,3,18,14,13



[[NOTE:- We always try our best to upload 100% correct solution BUT it is requested that you kindly review it before submission, please.]]

______________________________________________

www.VUsolutions.blogspot.com

past exam papers, solutions questions, virtual university assignment, virtual university assignment solution, vu assignment, vu assignments, vu handouts, vusulotions, vu past papers, vu solutions





0 comments:

Post a Comment