Data Structure and Algorithm - Stack

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

Push

Add a given element onto the stack

Peek

Copies element at the top of the stack and return it but does not delete it

Stack

Linear list in which data items can only be accessed at one end , called top of the stack. Follows Last In, First Out (LIFO) mechanism

Pop

Remove the top element of the stack and return it

Size

Return the number of elements in the stack

Basics operations

1. Peek 2. Push 3. Pop

Stack Applications (4)

1. Reversing data 2. Parsing data - translate source program to machine language 3. Postponing data usage - evaluation 4. Backtracking - computer gaming


Ensembles d'études connexes

Chap 38; Coronary Artery Disease

View Set

Chapter 12: Earthquakes and Earth's Interior

View Set

QI 102: How to Improve with the Model for Improvement

View Set

Basic Air Pollution Meteorology - Class 2

View Set

The Planets and Mythological Names

View Set

Maternal Child Nursing Chapter 37 Impact of Cognitive and Sensory Impairment on the Child and Family

View Set

HIT 135 - ch 21-22, HIT 135 - 20, HIT 135 - CH 18-19, HIT 135- CH 16, 17, HIT 135 - ch 14-15, HIT 135 - CH 12-13 Lymphatic and Immune Systems /, HIT 135 - CH 10-11 : Cardio/ Hematology, HIT 135 CH 9, HIT 135 - 7,8, 9, HIT 135 - CH 6, HIT 135 - CH 5

View Set