- Computer Science Engineering (CSE)
- Design and Analysis of Algorithms
- Stack can be reversed without using extr...

Q. |
## Stack can be reversed without using extra space by |

A. | using recursion |

B. | using linked list to implement stack |

C. | using an extra stack |

D. | it is not possible |

Answer» B. using linked list to implement stack | |

Explanation: if linked list is used for implementing stack then it can be reversed without using any extra space. |

View all MCQs in:
Design and Analysis of Algorithms

- Which of the following is considered as the top of the stack in the linked list implementation of the stack?
- What is the space complexity of program to reverse stack recursively?
- Using logical operator’s instead arithmetic operators saves time and space.
- Which of the following statement is true about stack?
- 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?
- What will be the time complexity of the code to reverse stack recursively?
- In what time can the Hamiltonian path problem can be solved using dynamic programming?
- What is the auxiliary space complexity of Z algorithm for pattern searching (m = length of text, n = length of pattern)?
- What is the space complexity of the recursive implementation used to find the nth fibonacci term?

Login to Continue

It will take less than 2 minutes

Report MCQ