Friday, May 5, 2017

Union Find Algorithm - one hour workout

May 5, 2017

Introduction


It is a good idea to have my own union find C# class and also put some test cases together for future use.

Here is the article to talk about union find in details on hackerearth.com.

Here is the blog to document the study on the topic.

Here is the blog to document more than one hour study on union find algorithm in world codesprint 10 contest.

Union Find Coding


It is in incognito mode, Julia did not share any code because she played the Rookie3 contest.

Follow up 



May 7, 2017 9:27am

Julia spent hours to test the union find algorithm, and planned to apply the algorithm to solve one of Rookie3 contest algorithms. She just applied the test case in less than one hour and solved the algorithm on Rookie3, score 25 point very easily. She did not have chance to look into the detail of the algorithm. 

May 10, 2017

Code review C# solution, and C# code is here

The path compression is implemented in the above algorithm. Every node's parent node is set to the root node of tree.



No comments:

Post a Comment