Stack (abstract Data Type) - Inessential Operations

Inessential Operations

In many implementations, a stack has more operations than "push" and "pop". An example is "top of stack", or "peek", which observes the top-most element without removing it from the stack. Since this can be done with a "pop" and a "push" with the same data, it is not essential. An underflow condition can occur in the "stack top" operation if the stack is empty, the same as "pop". Often implementations have a function which just returns if the stack is empty.

Read more about this topic:  Stack (abstract Data Type)

Famous quotes containing the words inessential and/or operations:

    Poetry presents indivisible wholes of human consciousness, modified and ordered by the stringent requirements of form. Prose, aiming at a definite and concrete goal, generally suppresses everything inessential to its purpose; poetry, existing only to exhibit itself as an aesthetic object, aims only at completeness and perfection of form.
    Richard Harter Fogle, U.S. critic, educator. The Imagery of Keats and Shelley, ch. 1, University of North Carolina Press (1949)

    A sociosphere of contact, control, persuasion and dissuasion, of exhibitions of inhibitions in massive or homeopathic doses...: this is obscenity. All structures turned inside out and exhibited, all operations rendered visible. In America this goes all the way from the bewildering network of aerial telephone and electric wires ... to the concrete multiplication of all the bodily functions in the home, the litany of ingredients on the tiniest can of food, the exhibition of income or IQ.
    Jean Baudrillard (b. 1929)