← Expedia questions

Print nested comments in a threaded manner

Filed under Expedia

Given a flat list of comment objects containing an ID, parent ID, message, and vote count, implement a function to display these comments in a nested, threaded hierarchy. Comments belonging to the…

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Expedia questions

Collected from public candidate posts and coding forums. Updated Nov 2026.