Stacks Flashcards

1
Q

a linear data structure that follows the Last-In-First-Out (LIFO)principle.

A

Stacks

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

(T or F) in stacks the last element added to the stack is the first one to be removed.

A

True

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

(T or F) in stacks Insertion and deletion allowed only at one end (top)

A

True

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

adding an element to the top of the stack

A

Push

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

removing the topmost element from the stack

A

Pop

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

viewing the topmost element without removing it in stacks

A

Peek

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

the stack is full and push operation is attempted

A

Overflow state

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

the stack is empty and we attempt the pop operation

A

Underflow state

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

Stacks are used to evaluate arithmetic expressions, handle operator precedence, and perform in fix-to-postfix conversion.

A

Expression Evaluation

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

Stacks are used to implement undo functionality in text editors, software applications, and interactive environments.

A

Undo Operations

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

Stacks are utilized in algorithms that require backtracking, such as maze-solving and depth-first search.

A

Backtracking

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

Stacks play a role in __________________________, particularly in managing activation records during program execution.

A

Memory Management

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

Array-based
top is increased by 1
new element is placed in index top

A

Push

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

Array-based
top is decreased by 1
element at index top is taken out

A

Pop

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

Array-based
top is -1 means

A

stack is empty

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

Linked list-based
refers to the first node of the list

A

top

17
Q

linked list-based
top is null means

A

stack is empty

18
Q

linked list-based
node is inserted in the beginning of the list

A

push operation

19
Q

linked list-based
first node of the list is deleted

A

pop operation