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

Which statement(s) is/are false? (If there are more than one correct answer, all

ID: 3715548 • Letter: W

Question

Which statement(s) is/are false? (If there are more than one correct answer, all items that apply must be selected to receive full credit) a. Queue is NOT LIFO, Stack is LIFO b. In in order traversal, we first visit the right child, then the parent, then the left child c. Accessing elements of a linked list is faster than accessing elements of an array, that is why when access time is vital, we better go with a linked list d. Binary tree can be regarded as a specific type of graphs e. All of the paths in any given Tree are "simple paths"

Explanation / Answer

a. True.
Stack is LIFO or Last in First Out. An element which is entered the most recently is the one that gets popped out first.
Queue on the other hand is FIFO or First in First Out.

b. False.
In inorder traversal, the correct order is left child, then parent and then right child.

c. False.
Accessing elements in an array is faster than that in a Linked List. This is because to reach a particular element in a linked list, you need to traverse the entire linked list up until you reach the desired element/node. With arrays, you can directly access the element just by referring to its base address of the array and index of the element.

d. True.
A Binary tree is essentially an acyclic graph, with each node having indegree = 1 (except root node) and outdegree = 0,1 or 2.

e. True.
A simple path is a path that does not go through a node twice. A tree is a acyclic graph, so it's not possible to obtain a path that goes through the same node twice. Hence, all the paths in any Tree are "simple paths".