Comment System Formatting

Asked at Nextdoor · Coding Questions · Difficulty: Medium

Given a comment system with each comment having a unique ID and a parent ID, print all the comments with indentation based on their parent comments. If some comments are deleted, leave a blank line in their place. Implement this functionality as a function.

Loading the problem…