{"id":25839393,"url":"https://github.com/arnellebalane/union-find","last_synced_at":"2026-05-17T15:37:06.087Z","repository":{"id":72264217,"uuid":"99566086","full_name":"arnellebalane/union-find","owner":"arnellebalane","description":"Implementation of the Union-Find data structure for NodeJS","archived":false,"fork":false,"pushed_at":"2017-08-09T10:22:45.000Z","size":42,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-01T04:32:19.538Z","etag":null,"topics":["data-structures","hacktoberfest","npm-package","union-find"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/arnellebalane.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-08-07T10:25:21.000Z","updated_at":"2020-10-03T14:42:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"39a6bd61-61dc-4df9-b31c-e51ce6e97b3b","html_url":"https://github.com/arnellebalane/union-find","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/arnellebalane/union-find","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arnellebalane%2Funion-find","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arnellebalane%2Funion-find/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arnellebalane%2Funion-find/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arnellebalane%2Funion-find/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arnellebalane","download_url":"https://codeload.github.com/arnellebalane/union-find/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arnellebalane%2Funion-find/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279001980,"owners_count":26083243,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["data-structures","hacktoberfest","npm-package","union-find"],"created_at":"2025-03-01T04:32:14.998Z","updated_at":"2025-10-09T19:13:55.311Z","avatar_url":"https://github.com/arnellebalane.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Union Find\n\nImplementation of the **Union-Find** data structure for NodeJS.\n\n\n## Installation\n\n```bash\n$ npm install git+https://git@github.com/arnellebalane/union-find.git\n```\n\n\n## Usage\n\nThis package exposes four implementations of the Union-Find data structure.\n\n```js\nimport {\n    QuickFindUF,\n    QuickUnionUF,\n    WeightedQuickUnionUF,\n    PathCompressionUF\n} from 'union-find';\n```\n\n\n## Api\n\n- **`constructor(size)`**: Initializes a new Union-Find data structure with a given size.\n- **`union(source, target)`**: Connects a node to another.\n- **`connected(source, target)`** _(Boolean)_: Checks whether two nodes are connected.\n\n\n## Example\n\n```js\nimport { QuickFindUF } from 'union-find';\n\nconst uf = new QuickFindUF(10);\nuf.union(4, 3);\nuf.union(3, 8);\nuf.connected(4, 8); // =\u003e true\nuf.connected(1, 3); // =\u003e false\n```\n\n\n## Contributing\n\n```bash\n# or `npm` if yarn is not available\n$ yarn install\n$ yarn test\n```\n\n\n## License\n\nMIT License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farnellebalane%2Funion-find","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farnellebalane%2Funion-find","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farnellebalane%2Funion-find/lists"}