Stack and Linear Data Structures - Lecture Notes | COSC 350, Study notes of Data Structures and Algorithms

Material Type: Notes; Professor: Sloan; Class: Data Structures; Subject: Computer Science; University: Wofford College; Term: Fall 2008;

Typology: Study notes

Pre 2010

Uploaded on 08/16/2009

koofers-user-x26
koofers-user-x26 🇺🇸

10 documents

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CS350: Data Structures Class Notes
Class 10: Monday, September 22, 2008
Stack and Linear Data Structures
Linear Structures include stacks, lists, queues, deques, arrays
Stacks—LIFO vs. Queue—FIFO
Terms: pushdown stack, top, base (or bottom)
Examples: tasks and interruptions, plates in cafeteria, back button on browsers, call stack
on computer (subroutine calls)
ADT for Stack
Stack() a stack (creator)
push(item) (mutator)
pop() item (mutator)
peek() item (accessor)
isEmpty() True, False
size() Natural number
Implementations: see text
Balance paren’s example
Began Infix, Prefix, Postfix notations
Homework for Wednesday: Modify code on 61 to work with a program in a file.

Partial preview of the text

Download Stack and Linear Data Structures - Lecture Notes | COSC 350 and more Study notes Data Structures and Algorithms in PDF only on Docsity!

CS350: Data Structures Class Notes

Class 10: Monday, September 22, 2008 Stack and Linear Data Structures Linear Structures include stacks, lists, queues, deques, arrays Stacks—LIFO vs. Queue—FIFO Terms: pushdown stack, top, base (or bottom) Examples: tasks and interruptions, plates in cafeteria, back button on browsers, call stack on computer (subroutine calls) ADT for Stack Stack()  a stack (creator) push(item) (mutator) pop()  item (mutator) peek()  item (accessor) isEmpty()  True, False size()  Natural number Implementations: see text Balance paren’s example Began Infix, Prefix, Postfix notations Homework for Wednesday: Modify code on 61 to work with a program in a file.