I share my learnings here. Thanks for reading.
Nothing here yet.
Now I understand your point Shubham Kesri Please let me know if there are any additional changes required in the updated version. The corrected (updated) Mark and Sweep algorithm is as follows: First, we delete unreferenced objects that are no longer in use. Mark the surviving referenced objects. Sweep the marked objects to the next survivor level. I will update the main article shortly. Thank you for taking the time to help me correct the logic!