{"id":25762320,"url":"https://github.com/aternus/c-data-structures","last_synced_at":"2026-06-10T02:31:06.047Z","repository":{"id":146195328,"uuid":"122960843","full_name":"Aternus/c-data-structures","owner":"Aternus","description":"Data Structures implemented in C.","archived":false,"fork":false,"pushed_at":"2018-02-26T11:56:01.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-26T19:42:19.688Z","etag":null,"topics":["c","data-structures","hash-table","linked-list","queue","stack","trie","xxhash"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Aternus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2018-02-26T11:35:05.000Z","updated_at":"2018-02-26T11:48:44.000Z","dependencies_parsed_at":"2023-05-09T19:24:13.328Z","dependency_job_id":null,"html_url":"https://github.com/Aternus/c-data-structures","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Aternus/c-data-structures","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aternus%2Fc-data-structures","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aternus%2Fc-data-structures/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aternus%2Fc-data-structures/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aternus%2Fc-data-structures/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Aternus","download_url":"https://codeload.github.com/Aternus/c-data-structures/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aternus%2Fc-data-structures/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34134633,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-10T02:00:07.152Z","response_time":89,"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":["c","data-structures","hash-table","linked-list","queue","stack","trie","xxhash"],"created_at":"2025-02-26T19:40:11.047Z","updated_at":"2026-06-10T02:31:06.042Z","avatar_url":"https://github.com/Aternus.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Data Structures (Collections) Summary\n\nBy this point we've now examined four different ways to store sets of data:\n\n1. Arrays\n2. Linked Lists\n3. Hash Tables\n4. Tries\n\nThere are even some variations on these (trees and heaps, quite similar to tries; stacks and queues\nquite similar to arrays or linked lists, etc.) but this generally cover most of what we're looking at in C.\n\n## Arrays\n\n* Insertion is bad - lots of shifting to fit an element in the middle\n* Deletion is bad - lots of shifting after removing an element\n* Lookup is great - random access, constant time\n* Relatively easy to sort\n* Relatively small size-wise\n* Stuck with a fixed size, no flexibility\n\n## Linked Lists\n\n* Insertion is easy - just tack onto the front\n* Deletion is easy - once you find the element\n* Lookup is bad - have to rely on linear search\n* Relatively difficult to sort - unless you're willing to compromise on super-fast insertion and instead sort as you construct\n* Relatively small size-wise (not as small as arrays)\n\n## Hash Tables\n\n* Insertion is a two-step process - hash, then add\n* Deletion is easy - once you find the element\n* Lookup is on average better than with linked lists because you have the benefit of a read-world constant factor\n* Not an ideal data structure if sorting is the goal - just use an array\n* Can run the gamut of size\n\n## Tries\n\n* Insertion is complex - a lot of dynamic memory allocation, but gets easier as you go\n* Deletion is easy - just free a node\n* Lookup is fast - not quite as fast as an array, but almost\n* Already sorted - sorts as you build in almost all situations\n* Rapidly becomes huge, even with very little data present, not great if space is at a premium\n\n### Credit\n\nThanks to Doug Lloyed and of course Prof. David .J Malan from Harvard University for their time and effort providing the books and lectures for this.\n(c) 2018\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faternus%2Fc-data-structures","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faternus%2Fc-data-structures","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faternus%2Fc-data-structures/lists"}