Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Could please someone tell me the correct answer for questions 19 and 20?? It;s c

ID: 3824056 • Letter: C

Question

Could please someone tell me the correct answer for questions 19 and 20?? It;s c programming...

Copy of Copy of When using an array to represent a tree, the formula to find the parent of a node at index i is parent_index = log_2(i + 1) parent_index = (i - 1)/2 parent_index = 2i + 1 parent_index = 2i + 2 Traversing a tree with a post-order traversal will visit each node in _____ order of node key values. All the answers are incorrect. Ascending (smallest to largest). Descending (largest to smallest). Start at the median and then alternate next-smallest and next-largest.

Explanation / Answer

question 19:

while using an array to represent a tree ,the formula to find a parent of a node at index i is

parent_index=(i-1)/2

(since , a parent of any node N>0 in such an array will always be at index (i-1)/2).


20)

all answers are incorrect

we traverse left part of sub tree ,next right part of sub tree and finally the root node.