From 1209effc0f54d08adda953d212f940a40881b613 Mon Sep 17 00:00:00 2001 From: Jidong Xiao Date: Mon, 13 Nov 2023 22:15:13 -0500 Subject: [PATCH] adding the push and pop animations --- lectures/23_priority_queues_II/README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lectures/23_priority_queues_II/README.md b/lectures/23_priority_queues_II/README.md index 554efb2..83b76ff 100644 --- a/lectures/23_priority_queues_II/README.md +++ b/lectures/23_priority_queues_II/README.md @@ -30,6 +30,8 @@ percolate_down(TreeNode * p) { } ``` +- Play this [animation](https://jidongxiao.github.io/CSCI1200-DataStructures/animations/heap/pop/index.html) to see how the pop works + ## 23.2 Implementing Push (a.k.a. Insert) - To add a value to the heap, a new last leaf node in the tree is created to store that value. @@ -47,6 +49,8 @@ percolate_up(TreeNode * p) { } ``` +- Play this [animation](https://jidongxiao.github.io/CSCI1200-DataStructures/animations/heap/push/index.html) to see how the push works + ## 23.3 Push (Insert) and Pop (Delete-Min) Usage Exercise - Suppose the following operations are applied to an initially empty binary heap of integers. Show the resulting heap after each delete_min operation. (Remember, the tree must be complete!)