{"id":16214615,"url":"https://github.com/lfeq/data-structures","last_synced_at":"2025-04-07T22:29:30.309Z","repository":{"id":197872360,"uuid":"699500946","full_name":"lfeq/Data-Structures","owner":"lfeq","description":null,"archived":false,"fork":false,"pushed_at":"2023-10-02T21:14:47.000Z","size":3203,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-13T23:45:02.796Z","etag":null,"topics":["cpp","datastructures"],"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/lfeq.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":"2023-10-02T18:57:10.000Z","updated_at":"2023-10-04T02:25:09.000Z","dependencies_parsed_at":null,"dependency_job_id":"c6b39455-42fb-42e4-bba0-610d252057d3","html_url":"https://github.com/lfeq/Data-Structures","commit_stats":null,"previous_names":["lfeq/data-structures"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lfeq%2FData-Structures","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lfeq%2FData-Structures/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lfeq%2FData-Structures/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lfeq%2FData-Structures/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lfeq","download_url":"https://codeload.github.com/lfeq/Data-Structures/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247740168,"owners_count":20988166,"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","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":["cpp","datastructures"],"created_at":"2024-10-10T11:11:45.145Z","updated_at":"2025-04-07T22:29:30.304Z","avatar_url":"https://github.com/lfeq.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Custom Data Structures in C++\n\nThis repository contains a collection of custom data structures implemented in C++. These data structures can be useful for various programming tasks, and they include:\n\n1. **Vector**: A dynamic array implementation that can resize itself as needed.\n2. **Linked List**: A singly linked list implementation.\n3. **Double Linked List**: A doubly linked list implementation.\n4. **Circular Linked List**: A circular singly linked list implementation.\n5. **Double Circular Linked List**: A circular doubly linked list implementation.\n6. **Queue**: A basic queue data structure.\n7. **Stack**: A basic stack data structure.\n8. **Binary Tree**: An implementation of a binary tree.\n9. **Tree**: An implementation of a generic tree.\n10. **Graph**: An implementation of a graph data structure.\n\n## Vector\n\nThe `Vector` class is a dynamic array that can grow in size as elements are added. It includes the following methods:\n\n```cpp\n#include \"Vector.h\"\n\nint main() {\n    // Create a vector of integers\n    Vector\u003cint\u003e myVector;\n\n    // Add elements to the vector\n    myVector.push_back(10);\n    myVector.push_back(20);\n    myVector.push_back(30);\n\n    // Access elements by index\n    int element = myVector.at(1); // element = 20\n\n    // Get the number of elements and capacity\n    size_t size = myVector.size(); // size = 3\n    size_t capacity = myVector.capacity(); // capacity = 4 (initial capacity is 2)\n\n    // Remove the last element\n    myVector.pop_back(); // Vector contains [10, 20] after this operation\n\n    // Check if the vector is empty\n    bool isEmpty = myVector.empty(); // isEmpty = false\n\n    // Clear the vector and free memory\n    myVector.clear();\n\n    return 0;\n}\n```\n## Linked List\n\nThe `LinkedList` class is a singly linked list with methods for manipulation:\n\n```cpp\n#include \"LinkedList.h\"\n\nint main() {\n    // Create a linked list of integers\n    LinkedList\u003cint\u003e myList;\n\n    // Add elements to the linked list\n    myList.push_back(10);\n    myList.push_back(20);\n    myList.push_back(30);\n\n    // Access elements by index\n    int element = myList.at(1); // element = 20\n\n    // Get the number of elements\n    size_t count = myList.count(); // count = 3\n\n    // Remove the last element\n    myList.pop_back(); // Linked list contains [10, 20] after this operation\n\n    // Check if the linked list is empty\n    bool isEmpty = myList.empty(); // isEmpty = false\n\n    // Clear the linked list and free memory\n    myList.clear();\n\n    return 0;\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flfeq%2Fdata-structures","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flfeq%2Fdata-structures","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flfeq%2Fdata-structures/lists"}