CIS 2500 Lecture 10: CIS2500 Lecture 10

31 views3 pages

Document Summary

Representation stacks and queues can be built using either linked lists of sequential memory arrays the list representation requires dynamically allocated structures to be added/removed. Linked representation removing a stack element -> take an element from the head. Sequential representation: stack stackis easy to represent as an array there is nodefined representation just a stack of values. Add element 4 by writing element to index (i) 5 and setting head to 5. A queue is harder to implement than a stack it continues to grow in one direction and will eventually reach the end of the array remove head from the end and put new integer within. A collection of data structures, variables and functions that operate on them formally, a methmatical entity with some operations that may be performed on it. We want to separate the data structure from the details of its implementation.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents