22_StackImplementations

22_StackImplementations - Click to edit Master subtitle...

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Click to edit Master subtitle style 2009 Dr. Tim Data Structures and Algorithms I Implementations of the Stack ADT Dr. Tim Margush University of Akron 2009 2009 Dr. Tim Goals Be able to implement a Stack using Linked Lists An Array A List Know the tradeoffs for common implementations of a stack 2009 Dr. Tim 2009 Dr. Tim Linked List Stack A Linked implementation is Easily expanded Efficient Simple to implement The LLStack class maintains a pointer to the top of the stack 2009 Dr. Tim 2009 Dr. Tim LLStack 2009 Dr. Tim public class LLStack<E> implements StackInterface<E>{ private Node<E> top; public void push(E anEntry){ } public E pop(){ } 2009 Dr. Tim Array Based Stack An Array implementation is Not as easily expanded Efficient, except for unused space in the array Simple to implement The class stores the location of the top item in an int member....
View Full Document

This note was uploaded on 02/22/2011 for the course CS 463 taught by Professor Dr. tim margush during the Fall '09 term at The University of Akron.

Page1 / 12

22_StackImplementations - Click to edit Master subtitle...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online