{"id":28947242,"url":"https://github.com/chihebabiza/my-cpp-queue-array","last_synced_at":"2026-03-10T23:36:39.976Z","repository":{"id":300017673,"uuid":"1004927372","full_name":"chihebabiza/My-cpp-queue-array","owner":"chihebabiza","description":"A simple, template-based queue class in C++ built on top of a custom dynamic array (`clsDynamicArray`). This implementation supports core queue operations such as `push`, `pop`, `front`, and `back`, along with extended utilities like reversing the queue and inserting at custom positions.","archived":false,"fork":false,"pushed_at":"2025-06-19T12:12:52.000Z","size":13,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-25T10:02:52.297Z","etag":null,"topics":["cpp","cpp-library","data-structures","oop","programming-advices","queue"],"latest_commit_sha":null,"homepage":"","language":"C++","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/chihebabiza.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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,"zenodo":null}},"created_at":"2025-06-19T11:52:27.000Z","updated_at":"2025-06-19T12:12:56.000Z","dependencies_parsed_at":"2025-06-19T13:36:56.398Z","dependency_job_id":null,"html_url":"https://github.com/chihebabiza/My-cpp-queue-array","commit_stats":null,"previous_names":["chihebabiza/my-cpp-queue-array"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/chihebabiza/My-cpp-queue-array","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chihebabiza%2FMy-cpp-queue-array","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chihebabiza%2FMy-cpp-queue-array/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chihebabiza%2FMy-cpp-queue-array/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chihebabiza%2FMy-cpp-queue-array/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chihebabiza","download_url":"https://codeload.github.com/chihebabiza/My-cpp-queue-array/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chihebabiza%2FMy-cpp-queue-array/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30362123,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T21:41:54.280Z","status":"ssl_error","status_checked_at":"2026-03-10T21:40:59.357Z","response_time":106,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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","cpp-library","data-structures","oop","programming-advices","queue"],"created_at":"2025-06-23T09:09:33.605Z","updated_at":"2026-03-10T23:36:39.952Z","avatar_url":"https://github.com/chihebabiza.png","language":"C++","readme":"# Queue Implementation Using Dynamic Array in C++\n\nA simple, template-based queue class in C++ built on top of a custom dynamic array (`clsDynamicArray`). This implementation supports core queue operations such as `push`, `pop`, `front`, and `back`, along with extended utilities like reversing the queue and inserting at custom positions.\n\n---\n\n## 📦 Features\n\n- FIFO Queue behavior (`push` to back, `pop` from front)\n- Supports any data type via templates\n- View the front and back elements\n- Get size or check if queue is empty\n- Insert items at the front, back, or after a specific index\n- Reverse the queue\n- Update items by index\n- Clear all contents\n\n---\n\n## 🧪 Example Usage\n\n```cpp\n#include \u003ciostream\u003e\n#include \"clsMyQueueArr.h\"\n\nint main() {\n    clsMyQueueArr\u003cint\u003e myQueue;\n\n    myQueue.push(10);\n    myQueue.push(20);\n    myQueue.push(30);\n\n    cout \u003c\u003c \"Front: \" \u003c\u003c myQueue.front() \u003c\u003c endl; // 10\n    cout \u003c\u003c \"Back: \" \u003c\u003c myQueue.back() \u003c\u003c endl;   // 30\n\n    myQueue.pop();  // removes 10\n    myQueue.Print(); // Output: 20 30\n\n    myQueue.InsertAfter(0, 25);\n    myQueue.UpdateItem(1, 22);\n    myQueue.Print(); // Output: 20 22 30\n\n    myQueue.Reverse();\n    myQueue.Print(); // Output: 30 22 20\n}\n````\n\n---\n\n## 📘 Public Methods\n\n| Method                      | Description                   |\n| --------------------------- | ----------------------------- |\n| `push(value)`               | Add item to back of the queue |\n| `pop()`                     | Remove item from front        |\n| `front()`                   | Return front element          |\n| `back()`                    | Return back element           |\n| `Print()`                   | Display all queue elements    |\n| `Size()`                    | Return number of elements     |\n| `IsEmpty()`                 | Check if queue is empty       |\n| `GetItem(index)`            | Get element at index          |\n| `UpdateItem(index, value)`  | Update value at index         |\n| `InsertAfter(index, value)` | Insert after a given index    |\n| `InsertAtFront(value)`      | Insert item at the front      |\n| `InsertAtBack(value)`       | Insert item at the back       |\n| `Reverse()`                 | Reverse queue order           |\n| `Clear()`                   | Clear all elements            |\n\n---\n\n## 🔧 Dependencies\n\n* Requires `clsDynamicArray.h` (your custom dynamic array class)\n\nMake sure to include both `.h` files and use `#include \"clsMyQueueArr.h\"` in your project.\n\n---\n\n## 📚 Use Case\n\nIdeal for:\n\n* Teaching data structures\n* Simple queue logic in C++\n* Practicing dynamic memory and templates\n\n---\n\n## 🧾 License\n\nThis project is provided under the MIT License. See [LICENSE](LICENSE.txt) for details.\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchihebabiza%2Fmy-cpp-queue-array","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchihebabiza%2Fmy-cpp-queue-array","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchihebabiza%2Fmy-cpp-queue-array/lists"}