Given an array 'parent' of size N where parent[i] is the parent of node i, and -1 indicates the root, construct the binary or general tree representation.
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.