McqMate

Q. |
## Which of the following is considered as the top of the stack in the linked list implementation of the stack? |

A. | last node |

B. | first node |

C. | random node |

D. | middle node |

Answer» B. first node | |

Explanation: first node is considered as the top element when stack is implemented using linked list. |

3.2k

0

Do you find this helpful?

19

View all MCQs in

Design and Analysis of AlgorithmsNo comments yet

- What is the time complexity of the program to reverse stack when linked list is used for its implementation?
- Which of the following takes O(n) time in worst case in array implementation of stack?
- Consider the brute force implementation of the rod cutting problem in which all the possible cuts are found and the maximum value is calculated. What is the time complexity of this brute force implementation?
- Consider the brute force implementation in which we find all the possible ways of multiplying the given set of n matrices. What is the time complexity of this implementation?
- Which of the following methods can be used to find the largest and smallest number in a linked list?
- Which of the following methods can be used to search an element in a linked list?
- Can binary search be applied on a sorted linked list in O(Logn) time?
- The dynamic programming implementation of the maximum sum rectangle problem uses which of the following algorithm?
- What is the space complexity of the following dynamic programming implementation used to find the minimum number of jumps?
- Which of the following statement is true about stack?