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…
More Nextdoor interview questions
- Analyzing Recent Machine Learning Paper Contributions and Applications
- ML News Recommendation System Design
- Designing Nextdoor Newsfeed User Interaction and Real-Time Feed System
- Crafting a Memorable Intern Experience Narrative
- Merge Intervals (Variant)
- Meeting Schedule Interval Overlap (day+time string parsing)