Question:
What method is used to place a value onto the top of a stack?
Answer:
push() method, Push is the direction that data is being added to the stack. push() member method places a value onto the top of a stack. Source: CoolInterview.com
push()method A stack is an abstract data type that serves as a collection of elements, with two principal operations: push, which adds an element to the collection, and pop, which removes the most recently added element that was not yet removed. Source: CoolInterview.com
Answered by: yasir | Date: 5/1/2016
| Contact yasir
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|