{"id":21977385,"url":"https://github.com/zmitry/struct","last_synced_at":"2025-08-02T20:32:54.077Z","repository":{"id":44042656,"uuid":"222306938","full_name":"zmitry/struct","owner":"zmitry","description":"Basic and advanced data structures implemented with typescript","archived":false,"fork":false,"pushed_at":"2023-01-05T01:03:50.000Z","size":1205,"stargazers_count":3,"open_issues_count":19,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-28T16:57:19.718Z","etag":null,"topics":["datastructures","graph","lru","pairing-heap"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/zmitry.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":"2019-11-17T20:23:10.000Z","updated_at":"2023-06-04T17:03:25.000Z","dependencies_parsed_at":"2023-02-03T03:02:14.984Z","dependency_job_id":null,"html_url":"https://github.com/zmitry/struct","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zmitry/struct","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zmitry%2Fstruct","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zmitry%2Fstruct/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zmitry%2Fstruct/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zmitry%2Fstruct/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zmitry","download_url":"https://codeload.github.com/zmitry/struct/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zmitry%2Fstruct/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268448362,"owners_count":24252019,"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-08-02T02:00:12.353Z","response_time":74,"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":["datastructures","graph","lru","pairing-heap"],"created_at":"2024-11-29T16:14:29.673Z","updated_at":"2025-08-02T20:32:54.038Z","avatar_url":"https://github.com/zmitry.png","language":"TypeScript","funding_links":["https://opencollective.com/@zmitry/struct/contribute"],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003ch1\u003e\n    \u003cbr/\u003e\n   \u003cimg src=\"https://github.com/zmitry/struct/blob/master/docs/logo.svg\"\u003e\n    \u003cbr /\u003e\n    Data structures library\n    \u003cbr /\u003e\n    \u003cbr /\u003e\n    \u003cbr /\u003e\n  \u003c/h1\u003e\n  \u003csup\u003e\n    \u003cbr /\u003e\n    \u003cbr /\u003e\n    \u003ca href=\"https://www.npmjs.com/package/@zmitry/struct\"\u003e\n       \u003cimg src=\"https://img.shields.io/npm/v/@zmitry/struct.svg\" alt=\"npm package\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://www.npmjs.com/package/@zmitry/struct\"\u003e\n      \u003cimg src=\"https://img.shields.io/npm/dm/@zmitry/struct\" alt=\"npm downloads\" /\u003e\n    \u003c/a\u003e\n    \u003cbr /\u003e\n    Collection of essential data structures for web development.\u003c/em\u003e\u003c/a\u003e.\n\n  \u003c/sup\u003e\n  \u003cbr /\u003e\n  \u003cbr /\u003e\n  \u003cbr /\u003e\n  \u003cbr /\u003e\n  \u003cpre\u003eyarn add \u003ca href=\"https://www.npmjs.com/package/@zmitry/struct\"\u003e@zmitry/struct\u003c/a\u003e\u003c/pre\u003e\n  \u003cbr /\u003e\n  \u003cbr /\u003e\n  \u003cbr /\u003e\n\u003c/div\u003e\n\n- [**Graph**](./src/graph/Readme.md)\n  - [`createGraph`](./src/graph/Readme.md) \u0026mdash; graph data structure\n  - [`createCompoundGraph`](./src/graph/Readme.md) \u0026mdash; hierarchal graph\n    \u003cbr/\u003e\n    \u003cbr/\u003e\n- [**Advanced graph algorithms**](./src/graph-alg/Readme.md)\n  - [`dfs`](./src/graph-alg/dfs.ts) \u0026mdash; depth first graph traversal\n  - [`topologicalSort`](./src/graph-alg/topological-stort-kahn.ts) \u0026mdash; Kahn topological sort\n  - [`connectedComponents`](./src/graph-alg/components.ts) \u0026mdash; connected components algorithm\n    \u003cbr/\u003e\n    \u003cbr/\u003e\n- [**Primitive**](./src/index.ts)\n  - [`createHeap`](./src/pairing-heap.ts) \u0026mdash; Pairing heap implementation.\n  - [`LRUCache`](./src/LRUCache.ts) \u0026mdash; LRU cache implementation\n    \u003cbr/\u003e\n    \u003cbr/\u003e\n\n\u003cbr /\u003e\n\n\u003c!-- \u003cp align=\"center\"\u003e\n  \u003ca href=\"./docs/Usage.md\"\u003e\u003cstrong\u003eUsage\u003c/strong\u003e\u003c/a\u003e \u0026mdash; how to import.\n  \u003cbr /\u003e\n  \u003ca href=\"https://opencollective.com/@zmitry/struct/contribute\"\u003e\u003cstrong\u003eSupport\u003c/strong\u003e\u003c/a\u003e \u0026mdash; add yourself to backer list below.\n\u003c/p\u003e --\u003e\n\n\u003cbr /\u003e\n\u003cbr /\u003e\n\u003cbr /\u003e\n\n\u003cdiv align=\"center\"\u003e\n\u003ch2\u003eRoadmap\u003c/h2\u003e\n\u003c/div\u003e\n\n- [x] LRU Cache\n- LRU with ttl\n- [x] Graph data structure without parent/multigraph support\n- [x] Topological sort\n- [x] Pairing heap using linked list\n- Priority queue\n- link-cut tree\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzmitry%2Fstruct","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzmitry%2Fstruct","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzmitry%2Fstruct/lists"}