Data Structures and Algorithms Quiz # 6

Instructions
Quiz: Data Structures and Algorithms Quiz # 6
Total Questions: 30 MCQs
Time: 30 Minutes

Note

  • Do not refresh the page while taking the test.
  • Results along with correct answers will be shown at the end of the test.
Data Structures And Algorithms Quiz # 6
Question 1 of 30
00:00
  • A binary tree, all the levels of which except possibly the last have the maximum number of nodes and all the nodes at the last level appear as far left as possible, is known as:

  • Which of the following operations is more expensive in the dynamically created linked list than it is in the conventional array?

  • In a selection sort algorithm, the number of passes required to perform the sort are ______.


  • Quicksort is run on two inputs shown below to sort them in the ascending order.


    i) 1,2,3,...n

    ii) n,n-1,n-2,...2,1


    If C1 and C2 be the number of comparisons made for the inputs (i) and (ii) respectively, then

  • What kind of list is the best to answer questions such as "Which is the item at position n?"

  • The breadth-first traversal (BFS) is a method to traverse______

  • Let A be a sorted array of n=10 elements. Assume that only one comparison is required to determine whether the target is equal to, less than, or greater than A[i]. Which of the following denotes the average successful time of finding an arbitrary element x in A using the binary search?

  • Which of the following tree traversal techniques reads the root before its children nodes?

  • Which of the following operations is more expensive in the array implementation of the linked list than it is in the dynamically created linked list?

  • Which of the following stack operations could result in a stack underflow?

  • In an AVL tree, if the balance factor of a node is -1, which of the following statement/s is/are true?

  • Which statement is true for a B-tree?

  • What is the minimum number of nodes in a full binary tree with height 3?

  • Which of these is the correct big -Oh expression for 1+2+3+...+n?

  • In the worst case, the number of comparisons needed to search a singly linked list of length n for a given element is

  • What should be added in place of "/*ADD A STATEMENT HERE*/", so that the function correctly reverses a linked list.

  • Is it possible to create a doubly linked list using only one pointer with every node.

  • Suppose each set is represented as a linked list with elements in arbitrary order. Which of the operations among union, intersection, membership, cardinality will be the slowest?

  • Which of the following operations is performed more efficiently by doubly linked list than by linear linked list?

  • The time required to search an element in a linked list of length n is

  • Which of the following sorting algorithms can be used to sort a random linked list with minimum time complexity?

  • Assume that reference of head of following doubly linked list is passed to above function 1 <--> 2 <--> 3 <--> 4 <--> 5 <-->6. What should be the modified linked list after the function call?

  • Which of the following points is/are true about Linked List data structure when it is compared with array

  • A heuristic is a(n) ____.

  • A member function that is declared ________ may not access any non-static data members in the class

  • A(n) ________ informs the compiler that a class will be declared later in the program.

  • Each object of a class has its own copy of the class's ________.

  • Every element in an array is assigned a unique number known as a ________.

  • In a truth table, the expression ____ is false.

  • In a truth table, the expression ____ is true