1. The complexity of searching an element from a set of n elements using Binary search algorithm is
A. O(n)
B. O(log n)
C. O(n2)
D. O(n log n)
2. What is not true about insertion sort?
A. Exhibits the worst case performance when the initial array is sorted in reverse order.
B. Worst case and average case performance is O(n2)
C. Can be compared to the way a card player arranges his card from a card deck.
D. None of the above!
Answer: D. None of the above!
3. Which of the following has search efficiency of O(1)
A. Tree
B. Heap
C. Hash Table
D. Linked-Lis
4. Which of the following is an example of dynamic programming approach?
A. Fibonacci Series
B. Tower of Hanoi
C. Dijkstra Shortest Path
D. All of the above
Answer: A. Fibonacci Series
5. A queue data-structure can be used for
A. expression parsing
B. recursion
C. resource allocation
D. all of the above
Answer: D. all of the above
Other Related Questions
1. Pick out the correct option. A. We cannot make an instance of an abstract base class B. We can make an instance of an abstract base class C. Both a & b D. None of the mentioned View Answer Answer: A. We cannot make an instance of an abstract base class Hide Answer 2. Where does the abstract class is used? A. base class only B. derived class C …
1. Suppose a circular queue of capacity (n-1) elements is implemented with an array of n elements. Assume that the insertion and deletion operations are carried out using REAR and FRONT as array index variables, respectively. Initially REAR FRONT=0. The conditions to detect queue full and queue is empty are? A. Full: (REAR+1)mod n == FRONT Empty: REAR==FRONT B. Full: (REAR+1)mod n == FRONT Empty: (FRONT+1) mod n == REAR …
1. Which is used to define the member of a class externally? Α. : B. :: C. # D. None of the mentioned View Answer Answer: B. :: Hide Answer 2. Which of the following is a valid class declaration? A. class A { int x; }; B. class B { } C. public class A{} D. object A { int x; }; View Answer Answer: A. class A {int …
1. Heap is an example of A. complete binary tree B. spanning tree C. sparse tree D. binary search tree View Answer Answer: A. complete binary tree Hide Answer 2. Which of the following is not derived data type in c? A. Array B. Pointer C. Struct D. Enum View Answer Answer: D. Enum Hide Answer 3. Which of the following approach help us understand better about Real time examples, …
1. The complexity of searching an element from a set of n elements using Binary search algorithm is A. O(n) B. O(log n) C. O(n2) D. O(n log n) View Answer Answer: B. O(log n) Hide Answer 2. What is not true about insertion sort? A. Exhibits the worst case performance when the initial array is sorted in reverse order. B. Worst case and average case performance is O(n2) C …
1. A______is a linear list in which insertions and deletions are made from either end of the structure. A. circular queue B. random of queue C. priority D. dequeuer View Answer Answer: D. dequeuer Hide Answer 2. Linked lists are not suitable to for the implementation of? A. Insertion sort B. Radix sort C. Polynomial manipulation D. Binary search View Answer Answer: D. Binary search Hide Answer 3. A characteristic …
1. Items in a priority queue are entered in a________order A. random B. order of priority C. as and when they come D. None of above View Answer Answer: B. order of priority Hide Answer 2. In a heap, element with the greatest key is always in the________node. A. leaf B. root C. first node of left sub tree D. first node of right sub tree View Answer Answer: B …
1. The insertion operation in the stack is called_____ A. insert B. push C. pop D. top View Answer Answer: B. push Hide Answer 2. ________ is the term used to insert an element into stack. A. push B. pull C. pop D. pump View Answer Answer: A. push Hide Answer 3. What will be the output of the program given below in 16-bit platform? #include <stdio.h> int main() { …