← Flipkart questions

Print reverse level order traversal from parent array

Filed under Flipkart

Given a tree represented as a parent array where `parent[i]` is the parent of node `i` (root has -1), print the reverse level order traversal. Siblings must appear in left-to-right order within their…

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 Flipkart questions

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