Stack Flashcards
1
Q
Techniques
A
- single stack
- double stack ( main , track)
- store additional details in entry ( ex : pair)
2
Q
Common Problem- reverse string
A
Push character by character and pop it.
3
Q
Common problem - postfix evaluation
A
Use stack to push operands.
Pop last 2 values when operator scanned in given input
4
Q
Common problem- max element
A
Can use temp stack or paired data