Professional Documents
Culture Documents
Stack Applications
Quiz
• Write a function that finds the largest number stored in a linked
list.
Example of Stacks
INFIX, POSTFIX and PREFIX
– Infix: A+B-C
– Postfix: AB+C-
– Prefix: -+ABC
• ( (AB+)*C-(DE-) ) $ (FG+)
• ( (AB+C*)-(DE-) ) $ (FG+)
• (AB+C*DE--) $ (FG+)
• AB+C*DE- -FG+$
$ 7 2 49 49
3 7 2 49 49,3
+ 49 3 52 52
Consider an Example: Q: A + ( B * C - ( D / E ^ F ) * G ) * H