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
151. The process of arranging data in alphabetical or numerical order is called
- Sorting
- Searching
- Traversal
- Merging
152. A _____ search begins the search with the first array element.
- serial
- random
- parallel
- binary
153. The data for which you are searching is called the
- search argument
- sorting argument
- delection argument
- binary argument
154. Which of the following is an postfix notation of NOT A OR NOT B NOT C
- A NOT B NOT C NOT
- A NOT B NOT C NOT AND OR
- A NOT B NOT C NOT OR
- ABC NOT
155. A postfix expression is merely the reverse of the prefix expression
- True
- False
157. If the binary search algorithm determines that the search argument is in the lower half of the array, which of the following statements will set the appropriate variable to the appropriate value ?
- start Sub = middle Sub - 1;
- start Sub = middle Sub + 1;
- stop Sub = middle Sub - 1;
- stop Sub = middle Sub + 1.
159. Which of the following is false ?
- A binary search begins with the middle element in the array
- A binary search continues halving he array either until amatch is found or until there are no more elements to search
- If the search argument is greater then thevalue located in the middle ofthe binary, the binary search continues in the lowerhalf of the array
- For a binary search to work, the data in the array must be arranged in either alphabetical or numerical order
160. When you use the bubble sort, the first step in swapping two of the elements in the code array is to
- assign code [x+2] to temp
- assign code [x] to temp
- assign code [x] to code [x+1]
- assign temp to code [x].