adding the animation
This commit is contained in:
committed by
JamesFlare1212
parent
2d3840b312
commit
efc2fbaaa3
@@ -159,6 +159,8 @@ int main() {
|
||||
5 4 3 3 1
|
||||
```
|
||||
|
||||
- Play this [animation](https://jidongxiao.github.io/CSCI1200-DataStructures/animations/priority_queue/max_heap/index.html) to see how this program works.
|
||||
|
||||
- You can use std::priority_queue as a min heap via using std::greater, as can be seen in this [example](min_heap.cpp):
|
||||
|
||||
```cpp
|
||||
@@ -190,6 +192,8 @@ int main() {
|
||||
1 3 3 4 5
|
||||
```
|
||||
|
||||
- Play this [animation](https://jidongxiao.github.io/CSCI1200-DataStructures/animations/priority_queue/min_heap/index.html) to see how this program works.
|
||||
|
||||
## 23.6 Overloading operator()
|
||||
|
||||
- When using std::priority_queue to store class objects, oftentimes, you need to define a class and overload its function call operator.<!--; or use a lambda expression.-->
|
||||
|
||||
Reference in New Issue
Block a user