Filters
Question type

The table below represents a portion of a computer's main memory containing a binary tree.Each node consists of three cells,the first being data,the second being a pointer to the node's left child,and the third being a pointer to the node's right child.If the null pointer is represented by 00 and the tree's root pointer contains 53,draw a picture of the tree showing the data in each node?  Address  Contents 50AA5156520053BB5400555056CC57005800\begin{array} { c c } \text { Address } & \text { Contents } \\50 & \mathrm { AA } \\51 & 56 \\52 & 00 \\53 & \mathrm { BB } \\54 & 00 \\55 & 50 \\56 & \mathrm { CC } \\57 & 00 \\58 & 00\end{array}

Correct Answer

verifed

verified

The nodes in which of the trees below will be printed in alphabetical order by the following recursive procedure? def printTree (Tree) : If (Tree is not None) : Print(Tree.Value) PrintTree(Tree.Right) PrintTree(Tree.Left)


A) The nodes in which of the trees below will be printed in alphabetical order by the following recursive procedure?  def printTree (Tree) : If (Tree is not None) : Print(Tree.Value)  PrintTree(Tree.Right)  PrintTree(Tree.Left)  A)    B)    C)
B) The nodes in which of the trees below will be printed in alphabetical order by the following recursive procedure?  def printTree (Tree) : If (Tree is not None) : Print(Tree.Value)  PrintTree(Tree.Right)  PrintTree(Tree.Left)  A)    B)    C)
C) The nodes in which of the trees below will be printed in alphabetical order by the following recursive procedure?  def printTree (Tree) : If (Tree is not None) : Print(Tree.Value)  PrintTree(Tree.Right)  PrintTree(Tree.Left)  A)    B)    C)

D) B) and C)
E) All of the above

Correct Answer

verifed

verified

If a stack contained the entries w,x,y,z (from top to bottom) ,which of the following would be the contents after two entries were removed and the entry r was inserted?


A) w, x, r
B) y, z, r
C) r, y, z
D) r, w, x

E) None of the above
F) All of the above

Correct Answer

verifed

verified

What condition indicates that a linked list is empty?

Correct Answer

verifed

verified

An empty linked list...

View Answer

Which of the following is not a means of locating an entry in a linked storage structure?


A) head pointer
B) child pointer
C) root pointer
D) null pointer

E) None of the above
F) All of the above

Correct Answer

verifed

verified

Suppose a binary tree is implemented as a linked structure in which each node contains both a left child pointer and a right child pointer.Which of the following statements is false?


A) The number of nodes in the tree is always at least the number of nodes on the longest path in the tree.
B) The number of null pointers in the tree is always greater than the number of nodes in the tree.
C) Each terminal node in the tree is always at the end of a path that is as least as long as any other path in the tree.
D) Both the left child and right child pointers of every terminal node are null.

E) B) and C)
F) C) and D)

Correct Answer

verifed

verified

Suppose a binary tree contained the nodes W,X,Y,and Z,and each node had at most one child.How many terminal nodes would be in the tree?


A) One
B) Two
C) Three
D) Undetermined

E) None of the above
F) A) and B)

Correct Answer

verifed

verified

The table below represents a portion of a computer's main memory containing a linked list.Each entry consists of two cells,the first being data,the second being a pointer to the next entry.If the null pointer is represented by 00 and the list's head pointer contains 52,modify the memory cells so the data at address 56 is inserted at the end of the list.  Address  Content 50AA510052BB535854CC550056DD570058EE5954\begin{array} { c c } \text { Address } & \text { Content } \\50 & \mathrm { AA } \\51 & 00 \\52 & \mathrm { BB } \\53 & 58 \\54 & \mathrm { CC } \\55 & 00 \\56 & \mathrm { DD } \\57 & 00 \\58 & \mathrm { EE } \\59 & 54\end{array}

Correct Answer

verifed

verified

Change the...

View Answer

What sequence of nodes from the tree What sequence of nodes from the tree     would be printed if the following recursive procedure were applied to it? def printTree(Tree): if (Tree is not None): print(Tree.Value) printTree(Tree.Right) would be printed if the following recursive procedure were applied to it? def printTree(Tree): if (Tree is not None): print(Tree.Value) printTree(Tree.Right)

Correct Answer

verifed

verified

The table below represents a portion of a computer's main memory containing a linked list.Each list entry consists of two cells,the first being data and the second being a pointer to the next list entry.If the null pointer is represented by 00 and the list's head pointer contains 56,what are the data entries in the list? (List the entries in the order they occur in the list.)  Address  Contents 50 AA 510052 BB 535854 CC 555056 DD 575458 EE 5900\begin{array} { c c } \text { Address } & \text { Contents } \\50 & \text { AA } \\51 & 00 \\52 & \text { BB } \\53 & 58 \\54 & \text { CC } \\55 & 50 \\56 & \text { DD } \\57 & 54 \\58 & \text { EE } \\59 & 00\end{array}

Correct Answer

verifed

verified

The following represents a portion of a computer's main memory.  Address Contents 505151565253535754585550565757525853\begin{array}{l}\text { Address}& \text { Contents }\\50 & 51 \\51 & 56 \\52 & 53 \\53 & 57 \\54 & 58 \\55 & 50 \\56 & 57 \\57 & 52 \\58 & 53\end{array} A.What would be stored at address 50 after executing the instruction "Copy the contents of the memory cell at address 54 to address 50"? B.What would be stored at address 50 after executing the instruction "Copy the contents of the memory cell pointed to by the cell at address 54 to address 50"?

Correct Answer

verifed

verified

The table below represents a portion of a computer's main memory containing a binary tree.Each node consists of three cells,the first being data,the second being a pointer to the node's left child,and the third being a pointer to the node's right child.If the null pointer is represented by 00 and the tree's root pointer contains 56,what data is in the left child of the root node?  Address  Contents 50AA5153520053BB5400550056CC57505800\begin{array} { c c } \text { Address } & \text { Contents } \\50 & \mathrm { AA } \\51 & 53 \\52 & 00 \\53 & \mathrm { BB } \\54 & 00 \\55 & 00 \\56 & \mathrm { CC } \\57 & 50 \\58 & 00\end{array}

Correct Answer

verifed

verified

What is the distinction between a user-defined data type and an abstract data type?

Correct Answer

verifed

verified

A user-defined data type is me...

View Answer

Showing 41 - 53 of 53

Related Exams

Show Answer