June 2003
Intermediate to advanced
624 pages
12h 41m
English
Queues are first-in, first-out—FIFO—constructs, which is often what you need to handle time-consuming tasks that you want to handle in a first-come, first-served manner. But there are occasions when you want to reverse the order of retrieval with first-in, last-out—FILO—constructs, and in that case you use stacks. The usual example here is a spring-loaded stack of plates in cafeterias, where the first plate in the stack is the last plate taken off. You've probably heard of stacks in programming; local variables in methods are pushed onto the top of the application's internal stack to store them and popped from the top of the stack to retrieve them in reverse order. You can see the significant public properties of Stack objects in ...