Hello , can anyone give me any good blog or tutorial on priority queue . i always have difficulty in implementing it , using and updating values in it .
Thanks !
# | User | Rating |
---|---|---|
1 | tourist | 3771 |
2 | jiangly | 3688 |
3 | Um_nik | 3539 |
4 | slime | 3498 |
5 | djq_cpp | 3486 |
6 | MiracleFaFa | 3466 |
7 | ksun48 | 3452 |
8 | Radewoosh | 3406 |
9 | greenheadstrange | 3393 |
10 | xtqqwq | 3382 |
# | User | Contrib. |
---|---|---|
1 | -is-this-fft- | 183 |
2 | awoo | 181 |
3 | YouKn0wWho | 177 |
4 | Um_nik | 175 |
5 | dario2994 | 172 |
6 | Monogon | 171 |
7 | adamant | 168 |
8 | maroonrk | 167 |
9 | antontrygubO_o | 166 |
10 | errorgorn | 164 |
Hello , can anyone give me any good blog or tutorial on priority queue . i always have difficulty in implementing it , using and updating values in it .
Thanks !
Name |
---|
hey , that's i understand but i don't want definition of those . i want to implement it wrt programming contests /
Is there a specific reason you want to implement your own priority queue? Often the standard library implementation is enough.
No , actually library is enough but i don't know where can i find all PQ libraries at one place . do u have any source , from where u studied PQ . if possible please also suggest operator overloading blogs / tutorials .
Redux
I usually just refer to one of the standard language references.
cpp
java
actually i was studying dijkartas ,
:https://www.geeksforgeeks.org/dijkstras-shortest-path-algorithm-using-priority_queue-stl/
i find a very weird syntax **** priority_queue< iPair, vector , greater > pq;
i couldn't find it anywhere , does the blog you given above contains everything about PQ ?
That is the syntax of templates in cpp.
Here is the language reference to templates in general https://en.cppreference.com/w/cpp/language/templates.
Also the previous link to cpp priority queues does describe the parameters for the priority queue template.
Thanks Redux
This is a good link to learn C++: https://www.learncpp.com/
If you are struggling in https://favtutor.com/blogs/dijkstras-algorithm-cpp then check out this blog, its quite helpful and detail.