CMPT 115 Lecture Notes - Lecture 10: Linked List, Popping, Memory Management

34 views10 pages
9 May 2016
School
Course
Professor

Document Summary

Notes written by michael horsch, mark eramian, ian mcquillan, lingling jin, and dmytro dyachuk. A stack: a stack is a linear, ordered list limited as follows: Elements are only inserted at the front (push). Elements are only deleted from the front (pop): like a stack of books, or a stack of plates. We can only add new books (plates) to the top of the stack. We can only remove the top book (plates) from the list: stacks are known as the last in-first out (lifo) data structure. Stacks: characteristic operations: deleting from the top of the stack is known as a pop. We pop the top element from the stack: adding to the top of the stack is known as a push. We can push some new element onto the top of the stack. Bracket checking: in math, every open bracket must have a close bracket. This is bad: we allow brackets to be nested.

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents