listsstacksand queues the next symbol read is we pop and output and then push then we read and output stack abc*+de* output now we read )so the stack is emptied back to the we output stack abc*+de*foutput we read nextit is pushed onto the stack then is read and output stack abc*+de* + output the input is now emptyso we pop and output symbols from the stack until it is empty stack abc*+de* + *output as beforethis conversion requires only (ntime and works in one pass through the input we can add subtraction and division to this repertoire by assigning subtraction and addition equal priority and multiplication and division equal priority subtle point is that the expression will be converted to and not our algorithm does the right thingbecause these operators associate from left to right this is not necessarily the case in generalsince exponentiation associates right to left not we leave as an exercise the problem of adding exponentiation to the repertoire of operators function calls the algorithm to check balanced symbols suggests way to implement function calls in compiled procedural and object-oriented languages the problem here is that when call is made to new functionall the variables local to the calling routine need to be saved by the systemsince otherwise the new function will overwrite the memory used by the calling routine' variables furthermorethe current location in the routine must be saved