TheAlgorithms / C-Plus-Plus

Collection of various algorithms in mathematics, machine learning, computer science and physics implemented in C++ for educational purposes.
https://thealgorithms.github.io/C-Plus-Plus
MIT License
30.02k stars 7.09k forks source link

[FEATURE] Indexed priority queue #2160

Closed ron0studios closed 1 year ago

ron0studios commented 1 year ago

Detailed description

I'd like to write an implementation for an indexed priority queue data structure for the project. It will be relatively simple, and mainly for educational purposes. I will write a class for an indexed priority queue that will be can hold any value type and a comparable type for the priority value. It will have the same time complexities of a regular priority queue, with the benefit of having access at O(1).

The implementation will follow along the lines of william fiset's video tutorial: https://youtu.be/jND_WJ8r7FE

Context

A lot of graph algorithms that use priority queues to improve their time complexities, such as prim's algorithm and dijkstra.

Possible implementation

I have the code ready and will make a pull request after cleaning up and adhering to the project's code of conduct

Additional information

No response

Panquesito7 commented 1 year ago

Thank you for your interest in contributing! 🎉 Before submitting a PR, please ensure the following:

ron0studios commented 1 year ago

Just made one, thanks!

Sakshi2002-Sinha commented 1 year ago

Hello, Can you please assign this issue to me? Thanks in advance :)

PrakarshSingh5 commented 1 year ago

hi sir plz assign this work to me

ron0studios commented 1 year ago

Hello, Can you please assign this issue to me? Thanks in advance :)

I'm already working on it, sorry

PrakarshSingh5 commented 1 year ago

Ohk no problem

On Fri, 14 Oct 2022, 9:15 pm Ron0Studios, @.***> wrote:

Hello, Can you please assign this issue to me? Thanks in advance :)

I'm already working on it, sorry

— Reply to this email directly, view it on GitHub https://github.com/TheAlgorithms/C-Plus-Plus/issues/2160#issuecomment-1279174169, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZ4JIRQ6N2BG3LYS6FZIIJLWDF53NANCNFSM6AAAAAAQ65LMG4 . You are receiving this because you commented.Message ID: @.***>

github-actions[bot] commented 1 year ago

This issue has been automatically marked as abandoned because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] commented 1 year ago

Please ping one of the maintainers once you add more information and updates here. If this is not the case and you need some help, feel free to ask for help in our Gitter channel or our Discord server. Thank you for your contributions!