How does the "Mark-and-Sweep" algorithm work? | Garbage Collector | javascript Interview Questions | NextRound.in