But when I run my code, I get the correct tree [1, 3, 3, -5, 3] using the baseline find() method. Using the efficient find() gives [3, 3, 3, -5, 3].
According to the assignment page, we were supposed to assume that we were using the baseline version of find() for the implementation, so I was wondering if this was a mistake?
I got a point off of my DisjointSetQuiz implementation:
-1 Correctness: Expected: [1, 3, 3, -5, 3], Got: [3, 3, 3, -5, 3]
But when I run my code, I get the correct tree [1, 3, 3, -5, 3] using the baseline find() method. Using the efficient find() gives [3, 3, 3, -5, 3].
According to the assignment page, we were supposed to assume that we were using the baseline version of find() for the implementation, so I was wondering if this was a mistake?