-
-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Closed
Labels
enhancementNew feature or requestNew feature or requeststaleAuthor has not responded to the comments for over 2 weeksAuthor has not responded to the comments for over 2 weeks
Description
Detailed description
I can add union by rank and path compression implementation for this algorithm. Which is not there. This implementation will optimize the running time of this algorithm. Currently, this code root function works in O(n) which can be optimized to O(logn). Also, the join function does not implement union by rank properly.
Context
This will optimize the algorithm.
Possible implementation
Path compression and Union by the rank method.
Additional information
Please assign this task to me.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requeststaleAuthor has not responded to the comments for over 2 weeksAuthor has not responded to the comments for over 2 weeks