Hi all A ___ is an undirected connected graph without cycles. A. tree B. multigr
ID: 3835634 • Letter: H
Question
Hi all
A ___ is an undirected connected graph without cycles. A. tree B. multigraph C. digraph D. connected component A subtree of node n is a rooted at ____. A. node n B. the parent of node n C. a child of node n D. a sibling of node n The ___ of a tree is the number of nodes on the longest path from the root to a leaf. A. height B. length C. depth D. balance In a ___ of height h, all nodes that are at a level less than h have two children each. A. general tree B. binary tree C. full binary tree D. complete binary tree Which of the following is NOT a property of a complete binary tree of height h? A. all nodes level h - 2 and above have children each. B. when a node at level h - 1 has children, nodes to its left at the same level have two children each C. when a node at level h - 1 has one child, it is a left child D. all leaves are at level h In an array based representation of a complete binary tree, which of the following represents the left child node tree [i]? A. tree [i + 2] B. tree [i - 2] C. tree [2 * i + 1] D. tree [2 * i + 2 The heapsort is ___ in the worst case. A. O(n) B. O(log n) C. O(n * log n) D. O(n^2) Quick sort can be slower than insertion sort. A. True B. False List three position-oriented ADTs. Consider the following graph Give the depth-first traversal order, show the states of the queue, the stack as yourExplanation / Answer
Option A is correct. As, a tree is an undirected graph in which any two vertices are connected by exactly one path. In other words, any acyclic connected graph is a tree. Option C is correct. As, In a binary tree – the left subtree of x is the tree rooted at the left child of x – the right subtree of x is the tree rooted at the right child of x. Option A is correct. As, Height of tree –The height of a tree is the number of edges on the longest downward path between the root and a leaf. Option B is correct. As, A binary tree is a tree data structure in which each node has at most two child nodes.The number of subtrees of a node is called the degree of the node. In a binary tree, all nodes have degree 0, 1, or 2. The degree of a tree is the maximum degree of a node in the tree. A binary tree is of degree 2.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.