adding the animation

This commit is contained in:
Jidong Xiao
2025-04-23 21:41:43 -04:00
committed by JamesFlare1212
parent 2d3840b312
commit efc2fbaaa3

View File

@@ -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.-->