[单选题]

Which traversal method for a binary tree does the following Pascal code illustrate? procedure traverse (p:pointer); begin if p<>nil then begin traverse(p ↑ .left); process(p); traverse(p ↑ .right); end end;

A.preorder

B.postorder

C.reorder

D.inorder

参考答案与解析:

相关试题

Which traversal method for a binary tree

[单选题]Which traversal method for a binary tree does the following Pascal code illustrate? Procedure traverse(p:pointer); Begin Ifp<>NIL Then begin Traverse (p^.left); Process(p); Traverse(p^.right) End; End_A.pre_orderB.middle_orderC.noneD.last_order

  • 查看答案
  • Traversing a binary tree in preorder is

    [单选题]Traversing a binary tree in preorder is equivalent toA.Traversing the forest corresponding to the binary tree in root-first order.B.Traversing the forest corresponding to the binary tree in root-last order.C.Traversing the forest corresponding to the

  • 查看答案
  • Traversing a binary tree in preorder is

    [单选题]Traversing a binary tree in preorder is equivalent to (68) .(68) A.Traversing the forest corresponding to the binary tree in root-first orderB.Traversing the forest corresponding to the binary tree in root-last orderC.Traversing the forest correspond

  • 查看答案
  • Suppose a given binary tree has 10 leaf

    [单选题]Suppose a given binary tree has 10 leaf nodes, the number of nodes with degree of 2 isA.12B.11C.9D.Indeterminable

  • 查看答案
  • Suppose a given binary tree has 10 left

    [单选题]Suppose a given binary tree has 10 left nodes,then the number of nodes with degree of 2 isA.12B.11C.9D.Indeterminable

  • 查看答案
  • Which of the following is NOT tree?A) Ed

    [单选题]Which of the following is NOT tree?A.) Educational campaigns are very important to early sowing.B.) Of all the advances that the writer hopes for, early sowing is the most important.C.) Peasants should remain the masters of their fields.D.) Governmen

  • 查看答案
  • In the following,which is not a method

    [单选题]In the following,which is not a method for inter-process communication? (73)(73) A. share memoryB.messageC.pipeD.memory copy

  • 查看答案
  • In which Spanning£­Tree states does a sw

    [单选题]In which Spanning-Tree states does a switch port learn MAC addresses? (Select two)A.BlockingB.ListeningC.ForwardingD.LearningE.Relaying

  • 查看答案
  • A bullet______(hit)the tree behind which

    [试题]A. bullet______(hit)the tree behind which he was hiding.

  • 查看答案
  • The hand steering is a method by which t

    [单选题]The hand steering is a method by which the motion of the rudder is controlled with ().A . a motor-driven steering wheelB . a pneumatic steering wheelC . a hand-driven steering wheelD . an electric steering wheel

  • 查看答案
  • Which traversal method for a binary tree