answersLogoWhite

0


Best Answer

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

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Difference between pop and push operation in data structure through c?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How is the structure of a cell different from the function of the cell?

actually, there is no difference between the structure and function. The structure usually corresponds with the function. for example, red blood cells are circular shaped so they can easily move through the weins and arteries.


What is the difference between air handling unit and package unit?

The difference between an air handling unit and a package unit have to do with the way air is circulated or cooled. An air handling unit recycles the air from the structure back into the system. A package unit cools the air as it enters a structure through the use of intake fans.


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.


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 interstitial and vacancy diffusion?

The main difference is atoms that which are channelled through the diffusing process where the atoms stick to the molecular structure of a material this only happens in interstitial diffusion where in vacancy diffusion the atoms reppelled away hence the word vacancy.


What is the difference between through and by with examples?

do u chat by mobile


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 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 a swamp and the bayou?

a bayou goes through a swamp


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


Describe the difference between an opaque object and a transparent object?

The basic difference between an opaque and a transparent object is that we can see through the transparent objects while through the opaque objects, we cannot see.


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.Ê