McqMate

Q. |
## Which of the following statement is true about stack? |

A. | pop operation removes the top most element |

B. | pop operation removes the bottom most element |

C. | push operation adds new element at the bottom |

D. | push operation removes the top most element |

Answer» A. pop operation removes the top most element | |

Explanation: as stack is based on lifo(last in first out) principle so the deletion takes place from the topmost element. thus pop operator removes topmost element. |

839

0

Do you find this helpful?

6

View all MCQs in

Design and Analysis of AlgorithmsNo comments yet

- Which of the following is considered as the top of the stack in the linked list implementation of the stack?
- Which of the following takes O(n) time in worst case in array implementation of stack?
- What is the space complexity of program to reverse stack recursively?
- Stack can be reversed without using extra space by
- What is the time complexity of the program to reverse stack when linked list is used for its implementation?
- What will be the time complexity of the code to reverse stack recursively?
- Consider the graph M with 3 vertices. Its adjacency matrix is shown below. Which of the following is true?
- Which of the following is true?
- Which of the following is true?
- Which of the following is true about the time complexity of the recursive solution of the subset sum problem?