{"id":28717149,"url":"https://github.com/amrtamertech/clsstack_with_dynamic_array_library-cpp","last_synced_at":"2025-06-15T03:13:50.542Z","repository":{"id":298894529,"uuid":"1001465472","full_name":"AmrTamerTech/clsStack_With_Dynamic_Array_Library-CPP","owner":"AmrTamerTech","description":"A C++ template-based stack implementation built using a custom dynamic array class (clsDynamicArray) and extended from a custom queue structure (clsMyQueueArr). This project demonstrates how to implement a flexible stack structure with additional features such as element insertion, updating, reversing, and random access, beyond traditional LIFO beh","archived":false,"fork":false,"pushed_at":"2025-06-13T12:57:01.000Z","size":21353,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-13T13:44:21.512Z","etag":null,"topics":["cpp","data-structures","dynamic-array","generic-programming","inheritance","oop","stack","templates"],"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/AmrTamerTech.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,"zenodo":null}},"created_at":"2025-06-13T12:31:45.000Z","updated_at":"2025-06-13T12:57:06.000Z","dependencies_parsed_at":"2025-06-13T13:54:34.635Z","dependency_job_id":null,"html_url":"https://github.com/AmrTamerTech/clsStack_With_Dynamic_Array_Library-CPP","commit_stats":null,"previous_names":["amrtamertech/clsstack_with_dynamic_array_library-cpp"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AmrTamerTech/clsStack_With_Dynamic_Array_Library-CPP","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AmrTamerTech%2FclsStack_With_Dynamic_Array_Library-CPP","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AmrTamerTech%2FclsStack_With_Dynamic_Array_Library-CPP/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AmrTamerTech%2FclsStack_With_Dynamic_Array_Library-CPP/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AmrTamerTech%2FclsStack_With_Dynamic_Array_Library-CPP/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AmrTamerTech","download_url":"https://codeload.github.com/AmrTamerTech/clsStack_With_Dynamic_Array_Library-CPP/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AmrTamerTech%2FclsStack_With_Dynamic_Array_Library-CPP/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259914931,"owners_count":22931334,"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","data-structures","dynamic-array","generic-programming","inheritance","oop","stack","templates"],"created_at":"2025-06-15T03:13:24.132Z","updated_at":"2025-06-15T03:13:50.527Z","avatar_url":"https://github.com/AmrTamerTech.png","language":"C++","readme":"# 📌 Stack Implementation (`clsMyStackArr`) ⚡\n\nA C++ template-based stack implementation built on top of a dynamic array-based queue (`clsMyQueueArr`). This class simulates LIFO (Last In, First Out) behavior using `clsDynamicArray`. 🚀\n\n---\n\n## 🌟 Project Overview\n\nThe `clsMyStackArr` class extends the `clsMyQueueArr` class and adapts its behavior to act as a **stack**. By overriding the `Push()` function to insert elements at the front of the dynamic array, it enables typical stack operations like `Push`, `Top`, and `Bottom`, while maintaining access to other dynamic features.\n\nThis implementation uses **C++ templates**, making it type-generic and suitable for any data type.\n\n---\n\n## 🔹 Core Functionalities:\n\n- 🚀 Push: Insert elements in LIFO order\n- 🔍 Top \u0026 Bottom: Access the first and last items\n- 📏 Stack Size, Print, and Clear\n- 🔄 Reverse and Modify Internal Elements (Inherited)\n- ✨ All the power of `clsMyQueueArr` + stack-specific control\n\n---\n\n## ✨ Features\n\n### 🔹 Stack-Specific Operations\n- `Push(Value)` – Adds an element to the **top** (front) of the stack.\n- `Top()` – Returns the **top** element of the stack.\n- `Bottom()` – Returns the **bottom** element of the stack (oldest pushed).\n\n### 🔹 Inherited Functionalities from `clsMyQueueArr`\n- `Pop()` – Removes the top (front) element.\n- `Size()` – Returns number of elements.\n- `IsEmpty()` – Checks if stack is empty.\n- `Print()` – Displays all stack elements.\n- `Reverse()` – Reverses stack order.\n- `GetItem(Index)`, `UpdateItem(Index, NewValue)`\n- `InsertAfter(Index, Value)`, `InsertAtBack(Value)`\n- `Clear()` – Empties the stack completely.\n\n---\n\n## 🚀 How It Works\n\n### 🔹 LIFO Behavior\n- `Push()` inserts at the **beginning** of the internal array.\n- `Pop()` removes from the **beginning** (top of stack).\n\n### 🔹 Element Access\n- `Top()` = first element = most recently pushed.\n- `Bottom()` = last element = earliest pushed.\n\n---\n\n## ⚙️ Technologies Used\n\n- **Language**: C++\n- **Templates**: Enables generic stack support\n- **Inheritance**: Leverages `clsMyQueueArr`\n- **Dynamic Array**: Efficient memory use via `clsDynamicArray`\n\n---\n\n## 🎯 Learning Outcomes\n\n✅ Understanding of stack behavior using arrays  \n✅ C++ templates and inheritance  \n✅ Custom dynamic data structures  \n✅ Using queue logic to implement a stack  \n\n---\n\n## 📜 License\n\nThis project is open-source. Feel free to use and extend it! 🚀\n\n---\n\n## 🤝 Contributing\n\nContributions and ideas are welcome. Fork the project, enhance it, and open a pull request!\n\n---\n\n## 🏁 How to Run\n\n1. 📥 Clone the repository:\n   ```bash\n   git clone https://github.com/your-username/clsStack_With_Dynamic_Array_Library-CPP.git\n   cd clsMyStackArr-CPP\n   ```\n2. 🛠 Include in your project:\n```bash\n\n#include\"clsMyQueueArr.h\" \n#include\"clsDynamicArray.h\"\n#invlude\"clsMyStackArr.h\"\n```\n3. 🧪 Compile and run using a C++ compiler:\n\n```bash\ng++ main.cpp -o app\n./app\n```\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famrtamertech%2Fclsstack_with_dynamic_array_library-cpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famrtamertech%2Fclsstack_with_dynamic_array_library-cpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famrtamertech%2Fclsstack_with_dynamic_array_library-cpp/lists"}