Python: Which statement about Reference Counting and Garbage Collection is the strongest interview answer?

Difficulty:

Easy

Questions:

1

Time Limit:

2 minutes

Passing Score:

100%

Question

Which statement about Reference Counting and Garbage Collection is the strongest interview answer?

  1. Reference Counting and Garbage Collection is mostly a naming style choice and has little effect on runtime behavior or design tradeoffs.
  2. CPython primarily reclaims objects through reference counting and supplements that with a cyclic garbage collector.
  3. Reference Counting and Garbage Collection exists mainly to reduce the number of files in a Python project.
  4. Reference Counting and Garbage Collection matters only for frontend scripting and not for backend or automation code.

Hint

Start with the core rule behind Reference Counting and Garbage Collection.

Answer and rationale

Correct answer: B. CPython primarily reclaims objects through reference counting and supplements that with a cyclic garbage collector.

CPython primarily reclaims objects through reference counting and supplements that with a cyclic garbage collector. This is the base concept interviewers commonly test first.

Track: Python