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
61. Which of the following statements is incorrect ?
- LR parsers can be constructed to recognize virtually all programming language constructs for which context for which context free grammar can be written
- The LR parsing method is the most general non backtracking shift reduce parsing method known
- An LR parser can detect syntactic error as soon as it is possible to do son on a left to right scan of the input
- The class of grammars that can be parsed using LR methods is a subset of the class of grammars that can be parsed with predictive parsers.
62. Which of the following tool is known as the Parser generator ?
- Lex
- Yaac
- TeX
- Emacs
63. Which of the following statements is wrong ?
- No left-recursive grammar can LL (1)
- No LL (1) grammar can be ambiguous
- Every LR (1) grammar is an LL (1) grammar
- Every grammar can be converted into an equivalent opertor grammar
64. Search tables used by compilers for efficient searching generally use
- hash tables
- linear lists of records
- binary search tables
- binary search trees
65. FORTRAN implementations do not permit recursion because
- they use static allocationn for variables
- they use dynamic allocation for variables
- stacks are not available on all machines
- it is not possible to implement recursion on all machinesd
66. An unrestricted use off the "goto" statement is harmful beccause
- it makes it more difficult to verify programs
- it increases the running time of the programs
- it increases the memory required for the programs
- it results in compiler generating longer machine code
67. Which of the following features of Pascal cannot be captured by context-free grammars ?
- Syntax of if-then-else statements
- syntax of recursive procedures
- whether a variable has been declared before its use
- variable names of arbitrary length
68. YACC generates parsers based on
- LALR (1) grammars
- LL (1) grammars
- operator-precedence grammars
- general context-free grammars
69. Which of the following conversions is not possible (algorithmically) ?
- NFA to DFA
- NPDA to DPDA
- regular grammar to conext-free grammar
- nondeterministic Turing machine (TM) to deterministic TM
70. Which of the following languages is not well suited for computation ?
- Pascal
- FORTRAN
- C
- COBOL