第六章
To represent hierarchical relationship between elements, which data structure is suitable?
 array

tree

 stack

答案: tree
What is the maximum number children that a binary tree node can have?The inorder traversal of tree will yield a sorted listing of elements of tree in
  Heaps

  Binary search trees

  Binary trees
If we store the nodes of a binary tree in an array with index starting from zero, the right child of a node having index n can be obtained at:
n+1
2n+2

2n+1
Which of the following traversal outputs the data in sorted order in a BST?
 Postorder

 Level order

 Preorder
To obtain a prefix expression, which of the following traversals is used?
 Preorder

 Inorder

 Level order
The maximum number of nodes in a tree for which postorder and preorder traversals may be equal to is _______ .Suppose the numbers 7, 5, 1, 8, 3, 6, 0, 9, 4, 2 are inserted in that order into an initially emptyBinary Search Tree. The Binary Search Tree uses the usual ordering on natural numbers. What is the inorder traversal sequence of the resultant tree?
  7 5 1 0 3 2 4 6 8 9

  0 1 2 3 4 5 6 7 8 9

  9 8 6 4 2 3 0 1 5 7
A full binary tree is a tree where________________.
each node has exactly one or two children.

each node has exactly two children


each node has exactly zero or two children.
A complete binary tree is a tree where________________.

each node has exactly zero or two children


every level of the tree is completely filled except the last level

each node has exactly two children

温馨提示支付 ¥3.00 元后可查看付费内容,请先翻页预览!
点赞(0) dxwkbang
返回
顶部