JuliaCollections / JuliaCollections/DataStructures.jl

DisjointSets: set sizes

Open
#297 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Julia
Stars
745
Forks
261
PR merge metrics
No merged PRs in 30d

Description

I noticed that DisjointSets doesn't store set sizes. I wanted to use DisjointSets for an algorithm where I need to quickly find an element's set size. Is set size not stored since users don't usually need this feature and an user can separately store set sizes and update them during set merge operations?

Just to make it clear, I am looking for a function find_set_size(a, n) which returns n's set size in DisjointSets a. I would be happy to send a pull request.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the DisjointSets implementation and its set-merge operations. Determine how a find_set_size(a, n) function should expose the size of n's set, then verify that it returns correct sizes after sets are merged.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
data
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.