answersLogoWhite

0

Pushing means putting an item onto a stack (data structure), so that it becomes the stack's top-most item. Popping means removing the top-most item from a stack. (You often hear a third term, peeking, which means looking at/reading the top-most item.)

When it comes to queues, you should generally use the terms enqueueing and dequeueing instead, where the former means appending an item to a queue's "back end" and the latter means removing the item at the "front end" from the queue.

These definitions suggest that a stack (if you picture it in your head) is spatially vertical, while a queue is horizontal. Another difference is that operations on a stack always happen at the same end, while operations on a queue happen at opposite ends.

When it comes to linked lists and double-ended queues (deques), the terms push and pop are also used, e.g. in C++'s STL, where you have operations such as push_front, push_back, pop_front, and pop_back. These simply imply that items can be appended or removed at both ends.

User Avatar

Wiki User

13y ago

What else can I help you with?

Related Questions

What is the difference between series and parralal circuit?

difference between series is one pathway through circuit,difference between parralal is more then one pathway through circuit.


What is the phase difference between the current through the resistor and inductor in an AC circuit?

The phase difference between the current through the resistor and inductor in an AC circuit is 90 degrees.


What is the difference between a torpedo and a missile?

The difference between a missile and a torpedo is that a torpedo travels in the waters and a missile flys through the air.


What is the difference between through and by with examples?

do u chat by mobile


Difference between flow chart and structure chart?

Structure chart shows the manageable levels. This chart is used in structured programming to arranged program modules in a tree structure. Flow chart can be used to document in any type of business system, from the movement of materials through machinery. It shows the flow of applicant information through the hiring process in a human resources department.


What is the difference between forex and stock?

The difference between Forex and stock trading is that one is national and the other is international. This means that when one is transacting Forex trades, one is trading on foreign markets. With this clear difference in mind, several other differences arise, such as their different hours of operation, their dependencies on differently valued currencies and also that someone does not need to work through a broker for forex trading.


What is the difference between bulk motion and diffusion?

The difference between the two is that bulk motion is the flow through the capillary. Diffusion is the movement of the molecules in a fluid.Ê


What is the Difference between bird call and song?

one is through a phone the other through a mic respectivly


What is the difference between NOEsy spectra or NOE difference spectra?

NOESY spectra provide information on through-space interactions between protons, showing correlations between protons that are close in space. NOE difference spectra compare two spectra to highlight differences in nuclear Overhauser effect (NOE) intensities between two conditions, such as before and after a perturbation, revealing changes in molecular structure or dynamics.


How do thermocouples work and what is their principle of operation?

Thermocouples work by measuring temperature through the voltage generated when two different metals are joined together. This is known as the Seebeck effect. When there is a temperature difference between the two junctions of the metals, it creates a voltage that is proportional to the temperature difference. This voltage can then be measured and used to determine the temperature.


What is the difference between an anus and uterus?

ANUS- it is the lower opening in mamals, through which feces are excreted. UTERUS- only present in females, it is a bag like structure which is commonly called the womb which carries the foetus during pregnancy


What is the difference between diffusion and facilitate diffusion?

The difference between diffusion and facilitated diffusion is that facilitated diffusion is that the molecules pass through special protein channels.