Analysis of Algorithms and Computational Complexity Questions and Answers
Understanding the Analysis of Algorithms and Computational Complexity questions with answers is crucial for students preparing for GATE, TCS, Infosys, and Wipro placement exams. This topic focuses on evaluating the efficiency of algorithms based on time and space complexity, which forms the foundation of advanced computer programming and system design. By solving programming questions and answers related to algorithm analysis, you can strengthen your logical thinking, optimize code performance, and make informed design decisions. In this section, we cover detailed MCQs and explanations to help you master Big O notation, asymptotic analysis, and algorithmic trade-offs. Perfect for both academic and placement preparation, this guide ensures clarity with well-explained examples.
Questions on algorithmic analysis for computer science aspirants can be complemented by data structure algorithms and software engineering MCQ
Analysis of Algorithms and Computational Complexity
171. Breadth-first traversal (BFS) is a method to traverse
- all successors of a visited node before any successors of any of those succcessors
- a single path of the graph as far it can go
- the graph using shortest path
- none of these
172. If a binary tree traversed in inorder, then numbers of the node are printed in ____ order
- ascending order
- desccending order
- randomly
- none of these
173. A list node representing an arc of a graph requires how many fields ?
- 3
- 2
- 4
- 1
174. Identity the correct statements about DFS traversal. I. It can be used to determine whether a graph is acyclic or not. II. It identify the connected component of an undirected graph III. traverses a single path of the graph until it visits a node with no successor.
- (i) and (iii)
- (ii), (iii)
- (i) and (ii)
- (i), (ii) and (iii)
175. Its appropriate to represent a queue as
- a circular list
- doubly linked list
- linear linked list
- array
176. Given two statements (i) Insertion of an element should be done at the last node in a circular list. (ii) Deletion of an element should be done at the last node of the circular list.
- Both are true
- Both are False
- first is true and second is false
- first is false and second is true
177. To insert a node in a circular list at rear position, it should be inserted at ____ of the queue
- Front position
- Front - 1 position
- Rear position
- Rear - 1 position
178. To free which of the following list traversing through the entire list is not necessary?
- Circular list
- Singly linked list
- Double linked list
- Both (b) and (c)
179. Graphs can be implemented using (i) arrays (ii) linked list (iii) stack (iv)queue
- (i), (ii) and (iv)
- (i), (ii) and (iii)
- (i) and (ii)