{"id":19725211,"url":"https://github.com/momen-alshouha/data-structure-queue","last_synced_at":"2026-06-09T18:31:29.294Z","repository":{"id":249246033,"uuid":"744138837","full_name":"Momen-Alshouha/data-structure-queue","owner":"Momen-Alshouha","description":"This repo contains a C++ template class for a queue -linked-list-based- , designed with OOP principles. It features essential queue operations such as enqueue, dequeue, front, rear, size tracking, and a copy constructor.","archived":false,"fork":false,"pushed_at":"2024-01-16T19:58:51.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-20T19:24:43.654Z","etag":null,"topics":["cpp","data-structures","linked-list","oop-principles","queue"],"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/Momen-Alshouha.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":"2024-01-16T17:41:51.000Z","updated_at":"2024-07-19T06:52:58.000Z","dependencies_parsed_at":"2024-07-19T16:18:22.047Z","dependency_job_id":null,"html_url":"https://github.com/Momen-Alshouha/data-structure-queue","commit_stats":null,"previous_names":["momen-alshouha/data-structure-queue"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Momen-Alshouha/data-structure-queue","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Momen-Alshouha%2Fdata-structure-queue","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Momen-Alshouha%2Fdata-structure-queue/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Momen-Alshouha%2Fdata-structure-queue/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Momen-Alshouha%2Fdata-structure-queue/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Momen-Alshouha","download_url":"https://codeload.github.com/Momen-Alshouha/data-structure-queue/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Momen-Alshouha%2Fdata-structure-queue/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34121021,"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-09T02:00:06.510Z","response_time":63,"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":["cpp","data-structures","linked-list","oop-principles","queue"],"created_at":"2024-11-11T23:28:39.760Z","updated_at":"2026-06-09T18:31:29.274Z","avatar_url":"https://github.com/Momen-Alshouha.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Queue Implementation in C++ Using Linked-List\n\nThis repository contains a C++ template class implementing a linked-list-based queue, adhering to Object-Oriented Programming principles.\n\n## Features\n\n- **Enqueue:** Add an element to the back of the queue.\n- **Dequeue:** Remove and return the element from the front of the queue.\n- **Front:** Get the data of the front element.\n- **Rear:** Get the data of the rear element.\n- **Size Tracking:** Keep track of the number of elements in the queue.\n- **Copy Constructor:** Create a copy of the queue.\n\n## Usage\n\nTo use this implementation, follow these steps:\n\n1. Clone the repository.\n2. Include the necessary header file in your C++ code: `Queue.h`.\n3. Create a `Queue` object and utilize its functionalities as needed.\n\n```cpp\n#include \u003ciostream\u003e\n#include \"queue.h\"\n\nint main()\n{\n    // Create a Queue object with a default value of 0\n    Queue\u003c\u003e queue(0);\n\n    // Enqueue elements into the queue\n    queue.enqueue(1);\n    queue.enqueue(2);\n    queue.enqueue(3);\n\n    // Print the elements of the queue\n    queue.print();\n\n    // Display front, rear, size, and whether the queue is empty\n    std::cout \u003c\u003c \"front: \" \u003c\u003c queue.front \u003c\u003c std::endl;\n    std::cout \u003c\u003c \"rear: \" \u003c\u003c queue.rear \u003c\u003c std::endl;\n    std::cout \u003c\u003c \"size: \" \u003c\u003c queue.size \u003c\u003c std::endl;\n    std::cout \u003c\u003c \"Is empty: \" \u003c\u003c std::boolalpha \u003c\u003c queue.IsEmpty() \u003c\u003c std::endl;\n\n    /*\n    queue.clear();\n    std::cout \u003c\u003c \"front: \" \u003c\u003c queue.front \u003c\u003c std::endl;\n    std::cout \u003c\u003c \"rear: \" \u003c\u003c queue.rear \u003c\u003c std::endl;\n    std::cout \u003c\u003c \"size: \" \u003c\u003c queue.size \u003c\u003c std::endl;\n    std::cout \u003c\u003c \"Is empty: \" \u003c\u003c std::boolalpha \u003c\u003c queue.IsEmpty() \u003c\u003c std::endl;\n    */\n\n // Example with a Queue of strings\n    Queue\u003cstring\u003e stringQueue(\"Default\");\n    stringQueue.enqueue(\"Hello\");\n    stringQueue.enqueue(\"World\");\n    stringQueue.enqueue(\"C++\");\n    stringQueue.print();\n\n    // Display front, rear, size, and whether the queue is empty for the string queue\n    std::cout \u003c\u003c \"\\nString Queue:\" \u003c\u003c std::endl;\n    std::cout \u003c\u003c \"front: \" \u003c\u003c stringQueue.front \u003c\u003c std::endl;\n    std::cout \u003c\u003c \"rear: \" \u003c\u003c stringQueue.rear \u003c\u003c std::endl;\n    std::cout \u003c\u003c \"size: \" \u003c\u003c stringQueue.size \u003c\u003c std::endl;\n    std::cout \u003c\u003c \"Is empty: \" \u003c\u003c std::boolalpha \u003c\u003c stringQueue.IsEmpty() \u003c\u003c std::endl;\n\n    // Copy constructor example\n    Queue\u003c\u003e newQueue = queue;  // Copy the contents of the existing queue\n    newQueue.print();\n\n    return 0;\n}\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmomen-alshouha%2Fdata-structure-queue","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmomen-alshouha%2Fdata-structure-queue","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmomen-alshouha%2Fdata-structure-queue/lists"}