New User Special Price Expires in

Let's log you in.

Sign in with Facebook


Don't have a StudySoup account? Create one here!


Create a StudySoup account

Be part of our community, it's free to join!

Sign up with Facebook


Create your account
By creating an account you agree to StudySoup's terms and conditions and privacy policy

Already have a StudySoup account? Login here

stack and infix,prefix,postfix

by: Gilson Dos Santos

stack and infix,prefix,postfix 12589.201580

Gilson Dos Santos
GPA 3.8
CS II data structures
Dr. Jonathan Maletic

Almost Ready


These notes were just uploaded, and will be ready to view shortly.

Purchase these notes here, or revisit this page.

Either way, we'll remind you when they're ready :)

Preview These Notes for FREE

Get a free preview of these Notes, just enter your email below.

Unlock Preview
Unlock Preview

Preview these materials now for free

Why put in your email? Get access to more of this material and other relevant free materials for your school

View Preview

About this Document

explains stacks and infix functions explains how to implement stack
CS II data structures
Dr. Jonathan Maletic
Class Notes
25 ?




Popular in CS II data structures

Popular in Computer Science and Engineering

This 0 page Class Notes was uploaded by Gilson Dos Santos on Monday November 2, 2015. The Class Notes belongs to 12589.201580 at Kent State University taught by Dr. Jonathan Maletic in Fall 2015. Since its upload, it has received 44 views. For similar materials see CS II data structures in Computer Science and Engineering at Kent State University.

Similar to 12589.201580 at KSU

Popular in Computer Science and Engineering


Reviews for stack and infix,prefix,postfix


Report this Material


What is Karma?


Karma is the currency of StudySoup.

You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!

Date Created: 11/02/15
Gilson Dos Santos 21 october ADTStack datablock of memory operationspushpop we can only see the top of stackTOS first one to be push in will be the last one to be poped out First In Last 0utFILO stackhpp const int cap100 because is constant templatelttypename Tgt class stack dont need the dynamic memory operations public stackTOS1 different way of initializingpreferred the compiller can optimize it better time saving bool isEmptyconstreturn TOS1 returns true or false bool isFUllconstreturn TOScap1 modifiers operations void pushT T POD private T scap int TOS empty top of stack is 1 on the hpp file else the compiler will not be able to find it template lttypename Tgt void stackltTgtpushT x assertisFull to prevent stack overflow sTOSx pre increment because we want TOS to increase before we do the operations templatelttypename Tgt T stackltTgtp0p assertisEmpty return STOS we used post decrement because we want TOS to decrease after we are done with the operation complicated problems on computer programing made easier with stacks 345 precedences rules infiX notation 345 easier for us but difficult for compilers post fixoperators at the end345 prefixoperators at the begining245 convert infix to prepost fix 34572 1FUlly parantesize expression 34572 2move operator to correspond leftPreright post 3set rid of parans Note order of operations Neve changes prefix 34572 postfix 34572 october 26 exprfull parantesize infix expressionvalid Sstack whilenot done with expr for postfix expressions tnexttokenexpr assign t one by one with the expression ift3939 checks for when we reached the end of the expression in parentesys assigns the variables and adds then to the stack rhsSpop OP5POP lhsSpop Spushlhsrhsop else ift3939 Spusht result is on top of stack Evaluete postfix epressionvalid exprpost fix expression whilenot done with expr tnexttokenexpr tokens are the expression we want in this case a number or operator ifisopreatort rhsSpop lhsSpop SpushEvallhstrhs else Spusht result is on top of stack


Buy Material

Are you sure you want to buy this material for

25 Karma

Buy Material

BOOM! Enjoy Your Free Notes!

We've added these Notes to your profile, click here to view them now.


You're already Subscribed!

Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'

Why people love StudySoup

Bentley McCaw University of Florida

"I was shooting for a perfect 4.0 GPA this semester. Having StudySoup as a study aid was critical to helping me achieve my goal...and I nailed it!"

Amaris Trozzo George Washington University

"I made $350 in just two days after posting my first study guide."

Steve Martinelli UC Los Angeles

"There's no way I would have passed my Organic Chemistry class this semester without the notes and study guides I got from StudySoup."

Parker Thompson 500 Startups

"It's a great way for students to improve their educational experience and it seemed like a product that everybody wants, so all the people participating are winning."

Become an Elite Notetaker and start selling your notes online!

Refund Policy


All subscriptions to StudySoup are paid in full at the time of subscribing. To change your credit card information or to cancel your subscription, go to "Edit Settings". All credit card information will be available there. If you should decide to cancel your subscription, it will continue to be valid until the next payment period, as all payments for the current period were made in advance. For special circumstances, please email


StudySoup has more than 1 million course-specific study resources to help students study smarter. If you’re having trouble finding what you’re looking for, our customer support team can help you find what you need! Feel free to contact them here:

Recurring Subscriptions: If you have canceled your recurring subscription on the day of renewal and have not downloaded any documents, you may request a refund by submitting an email to

Satisfaction Guarantee: If you’re not satisfied with your subscription, you can contact us for further help. Contact must be made within 3 business days of your subscription purchase and your refund request will be subject for review.

Please Note: Refunds can never be provided more than 30 days after the initial purchase date regardless of your activity on the site.