{"id":24142843,"url":"https://github.com/gmbeddard/ee200-templated_priority_queue","last_synced_at":"2026-06-06T13:31:06.828Z","repository":{"id":272085417,"uuid":"915485329","full_name":"gmbeddard/ee200-templated_priority_queue","owner":"gmbeddard","description":"An efficient implementation of a PriorityQueue class with a custom max-heap. Supports dynamic operations like insertion, removal, and retrieval of the highest-priority element, ensuring robust and flexible performance.","archived":false,"fork":false,"pushed_at":"2025-01-12T00:49:31.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-01T13:42:36.208Z","etag":null,"topics":["cpp20","datastructures","dynamicmemorymanagement","memory-management","priority-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/gmbeddard.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-01-12T00:45:52.000Z","updated_at":"2025-01-12T00:50:28.000Z","dependencies_parsed_at":"2025-01-18T22:46:50.620Z","dependency_job_id":null,"html_url":"https://github.com/gmbeddard/ee200-templated_priority_queue","commit_stats":null,"previous_names":["gmbeddard/ee200-templated_priority_queue"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gmbeddard/ee200-templated_priority_queue","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gmbeddard%2Fee200-templated_priority_queue","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gmbeddard%2Fee200-templated_priority_queue/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gmbeddard%2Fee200-templated_priority_queue/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gmbeddard%2Fee200-templated_priority_queue/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gmbeddard","download_url":"https://codeload.github.com/gmbeddard/ee200-templated_priority_queue/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gmbeddard%2Fee200-templated_priority_queue/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33984824,"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-06T02:00:07.033Z","response_time":107,"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":["cpp20","datastructures","dynamicmemorymanagement","memory-management","priority-queue"],"created_at":"2025-01-12T05:13:35.007Z","updated_at":"2026-06-06T13:31:06.809Z","avatar_url":"https://github.com/gmbeddard.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n### EE200 Homework Assignment: Templated PriorityQueue Class in C++\n\n#### Project Overview\nThis project implements a templated `PriorityQueue` class in C++ using a max-heap as the underlying data structure. The goal is to provide a robust and efficient priority queue capable of handling any data type that supports comparison operators. The implementation focuses on simplicity, avoiding manual memory management by leveraging standard containers such as `std::vector`.\n\n#### Features\n- **Constructors**:\n  - Default constructor for initializing an empty priority queue.\n  - Copy constructor to create deep copies of `PriorityQueue` instances.\n- **Destructor**: Ensures clean-up of any dynamically allocated resources.\n- **Core Operations**:\n  - `size()`: Returns the number of elements in the queue.\n  - `top()`: Retrieves the highest-priority element without removing it.\n  - `push(T x)`: Inserts an element into the queue while maintaining heap properties.\n  - `pop()`: Removes the highest-priority element.\n- **Operator Overloading**:\n  - Assignment operator performs deep copying of the heap structure.\n- **Heap Implementation**:\n  - Custom heap management ensures elements are maintained in max-heap order, supporting efficient insertion and deletion.\n\n#### Implementation Highlights\n- **Templating**: Allows the class to support any data type that implements comparison operators (`\u003c`, `\u003e`, `==`, `!=`).\n- **Heap Management**: Uses `std::vector` as the underlying container, with custom logic for maintaining max-heap properties.\n- **Encapsulation**: Implementation details are kept private, exposing only the necessary public interface.\n- **Valgrind-Clean**: Ensures no memory leaks or invalid accesses.\n\n#### Testing\nComprehensive test cases validate the functionality of the `PriorityQueue`:\n- Core operations (`push`, `pop`, `top`) for various data types.\n- Edge cases, such as empty queues and large datasets.\n- Correctness of deep copying with the copy constructor and assignment operator.\n- Efficiency of heap operations under varying input conditions.\n\n#### Repository Content\n- **Source Code**: Implementation of the `PriorityQueue` class.\n- **Makefile**: Build system for compiling and running tests.\n- **Test Files**: Unit tests to verify correctness and performance of the priority queue.\n\n#### Authors\nGabby Beddard. Project completed as part of a data structures course focusing on heap-based implementations and templated data structures in C++.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgmbeddard%2Fee200-templated_priority_queue","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgmbeddard%2Fee200-templated_priority_queue","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgmbeddard%2Fee200-templated_priority_queue/lists"}