Interview Questions 5: Successor with delete

We try to relate the solution to the problem of Successor with delete to Union-Find algorithm here and discuss how to relate them and make it more straightforward in the first place from two different angles: 1) Analyze it in recursive way and give informal proof; 2) Draw it out by hand.
Read More

Interview Questions 4: Union-find with specific canonical element

We discuss how to modify Union-Find algorithm to get the largest element in each connected components with every operation taking logarithmic time or better. And it turns out an extra array has to be allocated to keep the largest value and no constant extra memory approach could be achievabl
Read More