Разделы презентаций


Stacks

A stack is an ADT that might involve a dynamic or static implementation. A stack is a last-in-first-out (LIFO) or first-in-last-out (FILO) ADT. Implementations should include two operations, pushing and popping,

Слайды и текст этой презентации

Слайд 1Stacks
describe the functioning of the stack and queue data types

correctly using the terms ‘last in last out’ and ‘first

in first out’

Stacks describe the functioning of the stack and queue data types correctly using the terms ‘last in

Слайд 2A stack is an ADT that might involve a dynamic

or static implementation. A stack is a last-in-first-out (LIFO) or

first-in-last-out (FILO) ADT. Implementations should include two operations, pushing and popping, and a pointer to the top of the stack.

A stack is an ADT that might involve a dynamic or static implementation. A stack is a

Слайд 3
A real life example is a stack of books you

might have on your desk:







CPT-ADT-stacks-real-life.svg
In this example we keep adding

(pushing) books to the stack. If we want to get at the bottom book about Cars, we must first remove (pop) all the books above it. Hence First In Last Out (FILO)
A real life example is a stack of books you might have on your desk:CPT-ADT-stacks-real-life.svgIn this example

Слайд 4Let's take a look at a computer implementation of a

stack:
Pushing: Adds a new specified item to the top of

the stack
Popping: Removes the item from the top of the stack.
Let's take a look at a computer implementation of a stack:Pushing: Adds a new specified item to

Слайд 6Stacks have several uses:
Reversing queues (as seen above with the

Alphabetised names)
Performing Reverse Polish Calculations (see ....)
Holding return addresses and

syste states for recursive function calls
Stacks have several uses: Reversing queues (as seen above with the Alphabetised names)Performing Reverse Polish Calculations (see

Слайд 7Exercise: Stacks
Draw the stack after each of the following commands,

starting with an empty stack. What does the stack achieve:

Push

'Annabelle'
Push 'Chris'
Push 'Hemingway'
Push 'James'
Pop
Pop
Pop
Pop
Exercise: StacksDraw the stack after each of the following commands, starting with an empty stack. What does

Слайд 8Give the set of instructions required to get from State

1 to State 2 as shown below:
Exercise: Stacks

Give the set of instructions required to get from State 1 to State 2 as shown below:Exercise:

Слайд 9Give the set of instructions required to get from State

1 to State 2 as shown below:
Exercise: Stacks
Answer:
Pop
Pop
Push 'Sand'
Push 'Witches'

Give the set of instructions required to get from State 1 to State 2 as shown below:Exercise:

Слайд 10https://en.wikibooks.org/wiki/A-level_Computing/AQA/Paper_1/Fundamentals_of_data_structures/Stacks
Exercise: Stacks

https://en.wikibooks.org/wiki/A-level_Computing/AQA/Paper_1/Fundamentals_of_data_structures/StacksExercise: Stacks

Слайд 11https://en.wikibooks.org/wiki/A-level_Computing/AQA/Paper_1/Fundamentals_of_data_structures/Stacks

https://upload.wikimedia.org/wikipedia/commons/thumb/f/f5/CPT-ADT-stacks-real-life.svg/632px-CPT-ADT-stacks-real-life.svg.png
information from the site:

https://en.wikibooks.org/wiki/A-level_Computing/AQA/Paper_1/Fundamentals_of_data_structures/Stackshttps://upload.wikimedia.org/wikipedia/commons/thumb/f/f5/CPT-ADT-stacks-real-life.svg/632px-CPT-ADT-stacks-real-life.svg.pnginformation from the site:

Обратная связь

Если не удалось найти и скачать доклад-презентацию, Вы можете заказать его на нашем сайте. Мы постараемся найти нужный Вам материал и отправим по электронной почте. Не стесняйтесь обращаться к нам, если у вас возникли вопросы или пожелания:

Email: Нажмите что бы посмотреть 

Что такое TheSlide.ru?

Это сайт презентации, докладов, проектов в PowerPoint. Здесь удобно  хранить и делиться своими презентациями с другими пользователями.


Для правообладателей

Яндекс.Метрика