{"id":26489956,"url":"https://github.com/taharachedi/custom_queue_library-cpp","last_synced_at":"2025-03-20T07:53:40.645Z","repository":{"id":280957033,"uuid":"943734489","full_name":"taharachedi/Custom_Queue_Library-CPP","owner":"taharachedi","description":"This is a custom queue, different from a standard FIFO queue, resembling a linked list with unique behavior. I built this project to learn object-oriented programming and master queue manipulation. I also implemented the core queue logic.","archived":false,"fork":false,"pushed_at":"2025-03-06T07:24:58.000Z","size":780,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-06T08:27:09.792Z","etag":null,"topics":["data-structures","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/taharachedi.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":"2025-03-06T07:18:43.000Z","updated_at":"2025-03-06T07:25:16.000Z","dependencies_parsed_at":"2025-03-06T08:37:55.296Z","dependency_job_id":null,"html_url":"https://github.com/taharachedi/Custom_Queue_Library-CPP","commit_stats":null,"previous_names":["taharachedi/custom_queue_library-cpp"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taharachedi%2FCustom_Queue_Library-CPP","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taharachedi%2FCustom_Queue_Library-CPP/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taharachedi%2FCustom_Queue_Library-CPP/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taharachedi%2FCustom_Queue_Library-CPP/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/taharachedi","download_url":"https://codeload.github.com/taharachedi/Custom_Queue_Library-CPP/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244574743,"owners_count":20474818,"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":["data-structures","queue"],"created_at":"2025-03-20T07:53:40.147Z","updated_at":"2025-03-20T07:53:40.634Z","avatar_url":"https://github.com/taharachedi.png","language":"C++","readme":"# 📌 Queue Implementation (clsMyQueue) ⚡\n\n\u003e **A C++ template-based queue implementation using a doubly linked list, providing essential queue operations such as enqueue, dequeue, and traversal. 🚀**\n\n---\n\n## 🌟 Project Overview\n\nThe `clsMyQueue` class is a **generic queue** implementation in C++ built on top of a doubly linked list (`clsDblLinkedList`). This allows efficient dynamic memory management and extends the standard queue functionalities with additional features.\n\n### 🔹 Core Functionalities:\n- **Push (Enqueue)** elements to the back of the queue 🔄\n- **Pop (Dequeue)** elements from the front ❌\n- **Access Front \u0026 Back** elements directly 🔍\n- **Check Queue Size \u0026 Emptiness** 📏\n- **Reverse \u0026 Modify** elements within the queue 🔄\n- **Insert \u0026 Update** elements at specific positions ✏️\n- **Clear** the entire queue in one function call ✨\n\nThis queue implementation is **generic**, meaning it can store any data type using C++ templates.\n\n---\n\n## ✨ Features\n\n### 🔹 Basic Queue Operations\n- **`Push(Value)`**: Adds an element to the back of the queue.\n- **`Pop()`**: Removes the front element of the queue.\n- **`Front()`**: Retrieves the first element in the queue.\n- **`Back()`**: Retrieves the last element in the queue.\n- **`Size()`**: Returns the number of elements in the queue.\n- **`IsEmpty()`**: Checks if the queue is empty.\n- **`Print()`**: Displays the queue elements.\n\n### 🔹 Extended Functionalities\n- **`GetItem(Index)`**: Retrieves the value of an element at a specific index.\n- **`Reverse()`**: Reverses the order of the queue.\n- **`UpdateItem(Index, NewValue)`**: Updates the value of an element at a given index.\n- **`InsertAfter(Index, Value)`**: Inserts an element after a specific index.\n- **`InsertAtFront(Value)`**: Inserts an element at the front of the queue.\n- **`InsertAtBack(Value)`**: Inserts an element at the back of the queue.\n- **`Clear()`**: Removes all elements from the queue.\n\n---\n\n## 🚀 How It Works\n\n### 🔹 Enqueue \u0026 Dequeue\n- Elements are added using `Push(Value)` at the **end**.\n- Elements are removed using `Pop()` from the **front**.\n\n### 🔹 Accessing Elements\n- `Front()` and `Back()` allow **direct access** to queue ends.\n- `GetItem(Index)` retrieves an element at a given position.\n\n### 🔹 Modifications \u0026 Reversal\n- `UpdateItem(Index, NewValue)` modifies an existing value.\n- `Reverse()` swaps all node links to **reverse** the queue.\n- `InsertAfter(Index, Value)`, `InsertAtFront(Value)`, and `InsertAtBack(Value)` allow **custom insertions**.\n\n### 🔹 Memory Management\n- The queue dynamically allocates memory for new elements.\n- `Clear()` safely removes all elements to prevent memory leaks.\n\n---\n\n## 📚 Potential Enhancements\n\n- 🏗 **Iterator Support**: Implementing iterators for STL-like traversal.\n- ⏳ **Time Complexity Optimization**: Enhancing performance for large datasets.\n- 🗃️ **Persistent Storage**: Implementing file handling for saving queue data.\n- 🚀 **Thread Safety**: Making the queue thread-safe for concurrent operations.\n\n---\n\n## ⚙️ Technologies Used\n\n- **Language**: C++\n- **Templates**: Enables the queue to store any data type\n- **Doubly Linked List**: Ensures efficient insertion and deletion\n- **Dynamic Memory Allocation**: Uses pointers for flexible data storage\n\n---\n\n## 🎯 Learning Outcomes\n\nThis project demonstrates:\n- ✅ **Queue operations (enqueue, dequeue, front, back, size, empty check)**\n- ✅ **Generic programming with C++ templates**\n- ✅ **Linked list-based queue implementation for dynamic storage**\n- ✅ **Efficient memory management with pointers**\n\n---\n\n## 📜 License\n\nThis project is **open-source**. Feel free to modify and enhance it! 🚀\n\n---\n\n## 🤝 Contributing\n\nContributions are welcome! If you have ideas for improvements, submit a Pull Request.\n\n---\n\n## 🏁 Ready to Explore?\n\n### 🚀 How to Run\n1. **Download** the repository.\n2. **Include** `clsMyQueue.h` in your project.\n3. **Compile \u0026 Run** your C++ program with a standard compiler (e.g., `g++ main.cpp -o output`).\n4. **Test** different queue operations.\n\n---\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaharachedi%2Fcustom_queue_library-cpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftaharachedi%2Fcustom_queue_library-cpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaharachedi%2Fcustom_queue_library-cpp/lists"}