Skip to content

Kruskal.cpp Improvements #1677

@KrishanKantAgnihotri

Description

@KrishanKantAgnihotri

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

No one assigned

    Labels

    enhancementNew feature or requeststaleAuthor has not responded to the comments for over 2 weeks

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions