Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Branch mst final #82

Merged
merged 3 commits into from
Apr 9, 2024
Merged

Conversation

junnengsoo
Copy link
Collaborator

No description provided.

@junnengsoo junnengsoo changed the title Branch mst final feat: Branch mst final Apr 8, 2024
Copy link
Owner

@4ndrelim 4ndrelim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some minor edits, otherwise, good to merge

Prim's Algorithm uses a priority queue to keep track of the minimum weight edge that connects the current tree to an
unexplored node, which could possibly be updated each time a node is popped from the queue.

Kruskal's Algorithm uses a priority queue to sort all the edges by weight and the elements will not be updated at any
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doesnt use a PQ right?

@@ -0,0 +1,45 @@
# Minimum Spanning Tree Algorithms

## Background
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you briefly discuss the 4 properties of MST?

  1. Cut a MST and you'll get 2 MSTs
  2. no cycle (this and (1) is saying the same thing)
  3. cycle property
  4. cut property (also tells you that the minimum outgoing edge of every vertex is part of mst)
    ..


### Implementation Details

A priority queue (binary heap) is utilised to keep track of the minimum weight edge that connects the current tree to an
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice, but could you break it down into steps? so the chunk of text doesnt look too intimidating

@junnengsoo junnengsoo merged commit df717d9 into 4ndrelim:main Apr 9, 2024
1 check passed
@4ndrelim 4ndrelim linked an issue Apr 16, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix MST time complexity
2 participants