CS Notes 4

CS Notes 4 - Stack Implementation Monday, January 31, 2011...

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

View Full Document Right Arrow Icon
Stack Last-In First out data Structure Y Y X X Push Y Pop Y Pop X Getting on/off buses HTML Tags Browser Back button Program call stack Running Times Push: O(1) o LL- adds elements to top Pop: O(1) o LL- delete front front isEmpty: O(1) Size: O(1) Clear: O(1) o LL- Set front to null o Array- Set size-0
Background image of page 1

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

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

Unformatted text preview: Stack Implementation Monday, January 31, 2011 3:38 PM Push adds to the front of a LL Match parenthesis (use stack) a+(b*A[x])/d Push ( ( Push [ [ ( Pop and check if popped is [ ( Pop and check if popped is ( BufferedReader- allows for user input see ParenMatch.java...
View Full Document

This note was uploaded on 02/29/2012 for the course 198 112 taught by Professor Venugopal during the Spring '09 term at Rutgers.

Page1 / 2

CS Notes 4 - Stack Implementation Monday, January 31, 2011...

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

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