final practice 3

  1. Every binary tree is a binary search tree.
    false
  2. Every binary search tree is a tree.
    True because every node has two children except for the leaves
  3. Every binary search tree is a binary tree.
    True,
  4. A node in a binary tree must have two children
    False, a node can have not children.
  5. A node in a binary tree can have more than one parent
    False, a node can only have one parent
  6. . Each node of a binary search tree has a parent
    False, the root doesn’t have a parent.
  7. . In a binary search tree the info in all of the nodes in the left subtree of a node are less than the info in all of the nodes in the right subtree of the node.
    True, binary search tree must follow that order.
  8. A preorder traversal of a binary search tree processes the nodes in the tree in the exact reverse order that a postorder traversal processes them.
    False, is not a direct reverse.
  9. maximum number of levels that a binary search tree with 100 nodes can have?
    100 levels.
  10. minimum number of levels that a binary search tree with 100 nodes can have?
    7
  11. maximum total number of nodes in a binary tree that has N levels? (Remember that the root is level 0.)
    2^n-1
  12. maximum number of nodes in the Nth level of a binary tree?
    2^n
  13. number of ancestors of a node in the Nth level of a binary search tree?
    N ancestors
  14. number of different binary trees that can be made from three nodes that contain the key values 1, 2, and 3?
    5 x 6 = 30
  15. number of different binary search trees that can be made from three nodes that contain the key values 1, 2, and 3?
    5 different types because binary search trees has to be in ordered.
Author
lcsanc14
ID
344112
Card Set
final practice 3
Description
final test
Updated