{"id":13411670,"url":"https://github.com/ihebu/dsu","last_synced_at":"2026-01-14T22:04:41.622Z","repository":{"id":57580804,"uuid":"362181633","full_name":"ihebu/dsu","owner":"ihebu","description":"Disjoint Set data structure implementation in Go","archived":false,"fork":false,"pushed_at":"2022-01-29T08:42:56.000Z","size":17,"stargazers_count":14,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-07-31T20:48:23.570Z","etag":null,"topics":["datastructures","disjoint-set","golang"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ihebu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-04-27T16:35:38.000Z","updated_at":"2024-02-04T01:29:55.000Z","dependencies_parsed_at":"2022-09-26T19:24:58.320Z","dependency_job_id":null,"html_url":"https://github.com/ihebu/dsu","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/ihebu/dsu","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ihebu%2Fdsu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ihebu%2Fdsu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ihebu%2Fdsu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ihebu%2Fdsu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ihebu","download_url":"https://codeload.github.com/ihebu/dsu/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ihebu%2Fdsu/sbom","scorecard":{"id":483063,"data":{"date":"2025-08-04","repo":{"name":"github.com/ihebu/dsu","commit":"2b177e0243b7ee146f76b3d7d303c030a6875689"},"scorecard":{"version":"v5.2.1-28-gc1d103a9","commit":"c1d103a9bb9f635ec7260bf9aa0699466fa4be0e"},"score":3,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#code-review"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#sast"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#pinned-dependencies"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-19T17:05:37.461Z","repository_id":57580804,"created_at":"2025-08-19T17:05:37.461Z","updated_at":"2025-08-19T17:05:37.461Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28436268,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T21:32:52.117Z","status":"ssl_error","status_checked_at":"2026-01-14T21:32:33.442Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["datastructures","disjoint-set","golang"],"created_at":"2024-07-30T20:01:15.600Z","updated_at":"2026-01-14T22:04:41.595Z","avatar_url":"https://github.com/ihebu.png","language":"Go","readme":"# dsu \n\n[![GoDoc](https://godoc.org/github.com/ihebu/dsu?status.svg)](https://godoc.org/github.com/ihebu/dsu)\n[![Go Report Card](https://goreportcard.com/badge/github.com/ihebu/dsu)](https://goreportcard.com/report/github.com/ihebu/dsu)\n[![Build Status](https://travis-ci.com/ihebu/dsu.svg?branch=main)](https://travis-ci.com/ihebu/dsu)\n[![codecov](https://codecov.io/gh/ihebu/dsu/branch/main/graph/badge.svg)](https://codecov.io/gh/ihebu/dsu)\n[![Mentioned in Awesome Go](https://awesome.re/mentioned-badge.svg)](https://github.com/avelino/awesome-go) \n\nImplementation of the Disjoint-Set data structure.\nThe Disjoint-Set, Also called a Union-Find or Merge-Find set, is a data structure that stores a collection of disjoint (non-overlapping) sets. Equivalently, it stores a partition of a set into disjoint subsets. It provides operations for adding new sets,\nmerging sets (replacing them by their union), and finding a representative member of a set. The last operation allows to find out efficiently if any two elements are in the same or different sets.\n\n## Installation \n\n```bash\ngo get github.com/ihebu/dsu\n```\n\n## Documentation \n\nYou can check the code documentation [here](https://godoc.org/github.com/ihebu/dsu)\n\n## Usage Example\n\n```go\n\n// Create a new disjoint-set\nd := dsu.New()\n\n// Add the elements 1, 2, 3 to the set\nd.Add(1)\nd.Add(2)\nd.Add(3)\n\n// The set is now {1}, {2}, {3}\n\n// Unite the sets {1}, {2} \nd.Union(1, 2)\n\n// The set is now {1, 2}, {3}\n\n// Find the representative element of each set\nd.Find(1) // returns 2\nd.Find(2) // returns 2\nd.Find(3) // returns 3\n\n// Check the existence of an element in the set\nd.Contains(2) // returns true\nd.Contains(54) // returns false\n\n// Note : you can add elements of different type in the set\n// Example\n\nd.Add(\"hello\")\nd.Add(34.5)\n\nd.Union(\"hello\", 34.5)\n```\n","funding_links":[],"categories":["Data Integration Frameworks","Data Structures and Algorithms","数据结构与算法","Data Structures","Generators","Uncategorized"],"sub_categories":["Sets","集","Advanced Console UIs","Standard CLI"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fihebu%2Fdsu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fihebu%2Fdsu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fihebu%2Fdsu/lists"}