1. Question: Which graph traversal algorithm uses a queue to keep track of the vertices which need to be processed?

    A
    Breadth-first search

    B
    Depth-first search

    Note: Not available
    1. Report
  2. Question: A simple graph with n vertices and k components can have at the most _______.

    A
    n edges

    B
    n-k edges

    C
    (n-k)(n-k-1)/2 edges

    D
    (n-k)(n-k+1)/2 edges

    Note: Not available
    1. Report
  3. Question: What is the minimum number of edges which must be removed from a complete bipartite graph of six nodes K(6) so that the remaining graph is a planar?

    A
    2

    B
    3

    C
    4

    D
    6

    Note: Not available
    1. Report
  4. Question: Which feature of heaps allows them to be efficiently implemented using a partially filled array?

    A
    Heaps are binary search trees

    B
    Heaps are complete binary trees

    C
    Heaps are full binary trees

    D
    Heaps contain only integer data

    Note: Not available
    1. Report
  5. Question: What happens if you make a recursive call without making the problem smaller?

    A
    The operating system detects the infinite recursion because of the "repeated state"

    B
    The program keeps running until you press Ctrl-C

    C
    The results are non-deterministic

    D
    The run-time stack overflows, halting the program

    Note: Not available
    1. Report
  6. Question: Tree algorithms typically run in time O(d) . What is d?

    A
    The depth of the tree

    B
    The number of divisions at each level

    C
    The number of nodes in the tree

    D
    The total number of entries in all the nodes of the tree

    Note: Not available
    1. Report
  7. Question: Here is a code for an integer variable n while (n > 0) { n = n/10; // Use integer division } What is the worst case scenario analysis for the above loop?

    A
    O(1)

    B
    O(log n)

    C
    O(n)

    D
    O(n2)

    Note: Not available
    1. Report
  8. Question: Suppose we have a circular array implementation of a queue, with ten items in the queue stored at data[2] through data[11]. The CAPACITY is 42. Where does the push member function place the new entry in the array?

    A
    data[1]

    B
    data[2]

    C
    data[11]

    D
    data[12]

    Note: Not available
    1. Report
  9. Question: The operation for adding an entry to a stack is traditionally called ________.

    A
    add

    B
    append

    C
    insert

    D
    push

    Note: Not available
    1. Report
  10. Question: For a complete binary tree with depth d, the total number of nodes is:

    A
    2d+1

    B
    2d

    C
    2d-1

    D
    2d2

    Note: Not available
    1. Report
Copyright © 2024. Powered by Intellect Software Ltd