An array of parent pointers should describe a rooted tree, but it has extra roots and cycles. What is the fewest number of entries to change?
An array of parent pointers should describe a rooted tree, but it has extra roots and cycles. What is the fewest number of entries to change?
Opens with the full question.