A Short Survey of Data Structure Fundamentals

If certain there's only a single correct statement, select its (a), (b), (c) letter: guessing (a), (b), (c), is bad strategy. If any answer is clearly wrong choose the letter between the other two to best reflect your knowledge. If completely unsure or just unclear about the question and three basic answers choose (m). Answer all questions.

1. A stack S holds 4 data items x, m, b, and p. The last entered on the stack was b. The first entered on the stack was x. The item p was entered before item m. The 3 items at the top of the stack are removed and replaced in the reverse order. The item now at the top of stack is:

(a) x. (b) b. (c) p.

2. A queue holds data items a, b, and c, where a arrived first, c last. Two items leave the queue. Another called d arrives. The queue now contains:

(a) a followed by d.

(b) c followed by d.

(c) d followed by c.

3. Arranging several numerical data items into a linear order resembles:

(a) Creating a multiple predecessor data structure.

(b) Finding their greatest common factor.

(c) Ranking them.

4. A five-element process with precedences is given by a series of pairs (1st precedes, 2nd), as:

( A, E), ( A, B),( C, D), ( D, E).

The Scheduling Tree here is, technically:

(a) A forest data structure.

(b) A tree data structure.

(c) Neither (a) nor (b).

5. For a node X in a doubly-linked list with pointers RLINK and LLINK (R = "right", L = "left"):