Stack Flashcards

1
Q

Techniques

A
  • single stack
  • double stack ( main , track)
  • store additional details in entry ( ex : pair)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Common Problem- reverse string

A

Push character by character and pop it.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Common problem - postfix evaluation

A

Use stack to push operands.

Pop last 2 values when operator scanned in given input

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Common problem- max element

A

Can use temp stack or paired data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly