Embercode
✕
Linked ListsQuick quiz

Copying with random pointers

6 questions. Covers Copy a list with random pointers.

Questions 1 to 5 of 6

  1. 1. A list node has a random pointer. A copy is made with made->random = old->random;, which copies the pointer value. What does the copy's random pointer point at?
  2. 2. After step 1 of the interleave method, the list reads A, A', B, B', C, C'. In step 2, which expression sets the random pointer of the copy A'?
  3. 3. Which statements about the two copy methods in this lesson are true?

    Pick every answer that is true.

  4. 4. Which of these does check_copy test, as the lesson writes it?

    Pick every answer that is true.

  5. 5. Match each term to its meaning in this lesson.

    Choose the matching item for each row.

5 question(s) left on this page.