Steps to developing a usable algorithm.
1. Model the problem.
2. Find an algorithm to solve it.
3. Fast enough? Fits in memory?
4. If not, figure out why.
5. Find a way to address the problem.
6. Iterate until satisfied.
The scientific method.
Mathematical analysis.
Union Find
dynamic connectivity
quick find
quick union
improvements
applications
Donate $5 to me for a coffee with PayPal and read more professional and interesting technical blog articles. Follow me @Yaoli0615 at Twitter to get latest tech updates.