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
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
A matlab implementation is given for the problem to randomly select a number i (i >= 1 and i < = n) with probablity Pr(i), from 1 to n where n >= 1 given a probability discrete distribution P, such that Pr(i) = pi.

Read More
A quite neat and vectorized copy of matlab code to implement mutation operator of the genetic algorithm is given after introducing the mutation operator and the naive and basic implementation.

Read More
I rewrite an incompatible SQL script to create table correctly on both SQL Server 2008 and 2000. I also analyzed the detailed difference between these two different scripts and explains why they could create the same table.

Read More