GoConqr hat ein neues Design! Sag uns, wie es dir gefällt.

Quiz

Advanced Algorithm (Eldan) 2 (11) Dan

Alex Q 11 Fragen

Quiz starten

Fragen in diesem Quiz (11)

  1. 1Let LASTPOST, LASTIN and LASTPRE denote the last vertex visited in a postorder, inorder and preorder traversal, respectively, of a complete binary tree. Which of the following is always true?
    1. ALASTIN = LASTPOST
    2. BLASTIN = LASTPRE
    3. CLASTPRE = LASTPOST
    4. DNone of the above
  2. 2Which one of the following binary trees has its inorder and preorder traversals as BCAD and ABCD, respectively?Bild zu Frage 2
    1. AA
    2. BB
    3. CC
    4. DD
  3. 3The numbers 1, 2, .... n are inserted in a binary search tree in some order. In the resulting tree, the right subtree of the root contains p nodes. The first number to be inserted in the tree must be
    1. Ap
    2. Bp + 1
    3. Cn - p
    4. Dn - p + 1
  4. 4A binary search tree contains the numbers 1, 2, 3, 4, 5, 6, 7, 8. When the tree is traversed in pre-order and the values in each node printed out, the sequence of values obtained is 5, 3, 1, 2, 4, 6, 8, 7. If the tree is traversed in post-order, the sequence obtained would be
    1. A8, 7, 6, 5, 4, 3, 2, 1
    2. B1, 2, 3, 4, 8, 7, 6, 5
    3. C2, 1, 4, 3, 6, 7, 8, 5
    4. D2, 1, 4, 3, 7, 8, 6, 5
  5. 5If all the edge weights of an undirected graph are positive, then any subset of edges that connects all the vertices and has minimum total weight is a
    1. AHamiltonian cycle
    2. Bgrid
    3. Chypercube
    4. Dtree
  6. 6When searching for the key value 60 in a binary search tree, nodes containing the key values 10, 20, 40, 50, 70 80, 90 are traversed, not necessarily in the order given. How many different orders are possible in which these key values can occur on the search path from the root to the node containing the value 60?
    1. A35
    2. B64
    3. C5040
    4. D128
  7. 7The following three are known to be the preorder, inorder and postorder sequences of a binary tree. But it is not known which is which.
    MBCAFHPYK
    KAMCBYPFH
    MABCKYFPH
    Pick the true statement from the following.
    1. AI and II are preorder and inorder sequences, respectively
    2. BI and III are preorder and postorder sequences, respectively
    3. CII is the inorder sequence, but nothing more can be said about the other two sequences
    4. DII and III are the preorder and inorder sequences, respectively
  8. 8Consider the following sequence of nodes for the undirected graph given below.
    a b e f d g c
    a b e f c g d
    a d g e b c f
    a d b c g e f
    A Depth First Search (DFS) is started at node a. The nodes are listed in the order they are first visited. Which all of the above is (are) possible output(s)?
    Bild zu Frage 8
    1. A1 and 3 only
    2. B2 and 3 only
    3. C2, 3 and 4 only
    4. D1, 2, and 3
  9. 9Which of the following statement is false?
    1. AA tree with n nodes has (n-1) edges.
    2. BA labeled rooted binary tree can be uniquely constructed given its postorder and preorder traversal results.
    3. CA complete binary tree with n internal nodes has (n+1) leaves.
    4. DThe maximum number of nodes in a binary tree of height h is (2^(k+1) -1)
  10. 10A complete n-ary tree is one in which every node has 0 or n sons. If x is the number of internal nodes of a complete n-ary tree, the number of leaves in it is given by
    1. Ax(n-1)+1
    2. Bxn-1
    3. Cxn+1
    4. Dx(n+1)

Informationen

Beschreibung
Quiz am Advanced Algorithm (Eldan) 2 (11) Dan, erstellt von Alex Q am 24/12/2017.
Autor
Alex Q
Sprache
English
Aufrufe
88
Bewertung
Noch keine Bewertungen
Bewerte dieses Quiz
Bewerte dieses Quiz

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck