stacks and queues restricted access in an arrayany item can be accessedeither immediately--if its index number is known--or by searching through sequence of cells until it' found in the data structures in this howeveraccess is restrictedonly one item can be read or removed at given time (unless you cheatthe interface of these structures is designed to enforce this restricted access access to other items is (in theorynot allowed more abstract stacksqueuesand priority queues are more abstract entities than arrays and many other data storage structures they're defined primarily by their interfacethe permissible operations that can be carried out on them the underlying mechanism used to implement them is typically not visible to their user the underlying mechanism for stackfor examplecan be an arrayas shown in this or it can be linked list the underlying mechanism for priority queue can be an array or special kind of tree called heap we'll return to the topic of one data structure being implemented by another when we discuss abstract data types (adtsin "linked lists stacks stack allows access to only one data itemthe last item inserted if you remove this itemyou can access the next-to-last item insertedand so on this capability is useful in many programming situations in this section we'll see how stack can be used to check whether parenthesesbracesand brackets are balanced in computer program source file at the end of this we'll see stack playing vital role in parsing (analyzingarithmetic expressions such as *( + stack is also handy aid for algorithms applied to certain complex data structures in "binary trees,we'll see it used to help traverse the nodes of tree in "graphs,we'll apply it to searching the vertices of graph ( technique that can be used to find your way out of mazemost microprocessors use stack-based architecture when method is calledits return address and arguments are pushed onto stackand when it returnsthey're popped off the stack operations are built into the microprocessor some older pocket calculators used stack-based architecture instead of entering arithmetic expressions using parenthesesyou pushed intermediate results onto stack we'll learn more about this approach when we discuss parsing arithmetic expressions in the last section in this