Analysis of Algorithms and Computational Complexity Questions and Answers

Practice Mode
Showing 10 of 239 questions
Q151
The process of arranging data in alphabetical or numerical order is called
  • A Sorting
  • B Searching
  • C Traversal
  • D Merging
Answer: Option A
Q152
A _____ search begins the search with the first array element.
  • A serial
  • B random
  • C parallel
  • D binary
Answer: Option A
Q153
The data for which you are searching is called the
  • A search argument
  • B sorting argument
  • C delection argument
  • D binary argument
Answer: Option A
Q154
Which of the following is an postfix notation of NOT A OR NOT B NOT C
  • A A NOT B NOT C NOT
  • B A NOT B NOT C NOT AND OR
  • C A NOT B NOT C NOT OR
  • D ABC NOT
Answer: Option B
Q155
A postfix expression is merely the reverse of the prefix expression
  • A True
  • B False
Answer: Option A
Q156
A stack may be used to aid in evaluating a prefix expression
  • A True
  • B False
Answer: Option A
Q157
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 ?
  • A start Sub = middle Sub - 1;
  • B start Sub = middle Sub + 1;
  • C stop Sub = middle Sub - 1;
  • D stop Sub = middle Sub + 1.
Answer: Option C
Q158
The number of nodes in a full binary tree of depth 4 is
  • A 15
  • B 16
  • C 14
  • D 13
Answer: Option C
Q159
Which of the following is false ?
  • A A binary search begins with the middle element in the array
  • B A binary search continues halving he array either until amatch is found or until there are no more elements to search
  • C If the search argument is greater then thevalue located in the middle ofthe binary, the binary search continues in the lowerhalf of the array
  • D For a binary search to work, the data in the array must be arranged in either alphabetical or numerical order
Answer: Option B
Q160
When you use the bubble sort, the first step in swapping two of the elements in the code array is to
  • A assign code [x+2] to temp
  • B assign code [x] to temp
  • C assign code [x] to code [x+1]
  • D assign temp to code [x].
Answer: Option A
Questions and Answers for Competitive Exams Various Entrance Test