Work in HR? Unlock Free Profile

Netflix Senior Software Engineer Interview Question

"design garbage collection system"
Add Tags [?]

Part of a Senior Software Engineer Interview Review - one of 246 Netflix Interview Reviews

Answers & Comments

of 0
The simplest concept is (naive) `mark and sweep`: one walk through the graph of objects (starting from the `root` objects that are known to be reachable), `marking` all the objects reached in the walk; then a `sweep` through all existing objects, deleting all the unmarked ones (and unmarking the marked ones to be ready for the next cycle). Many improvements are possible, esp. to allow incremental or concurrent GC, but they take quite a bit longer to explain;-).
- Alex on May 19, 2013

To comment on this question, Sign In with Facebook or Sign Up

Tags are like keywords that help categorize interview questions that have something in common.