From 151978512725323b158517b9ac77420267a55f7e Mon Sep 17 00:00:00 2001 From: Jidong Xiao Date: Tue, 2 Apr 2024 11:39:59 -0400 Subject: [PATCH] adding the animation --- labs/11_stacks_and_queues/README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/labs/11_stacks_and_queues/README.md b/labs/11_stacks_and_queues/README.md index 2cc6188..0bc0fbd 100644 --- a/labs/11_stacks_and_queues/README.md +++ b/labs/11_stacks_and_queues/README.md @@ -8,11 +8,16 @@ Level Order Traversal: 1 2 3 4 5 6 7 8 9 Level Order Traversal: 1 2 3 4 5 6 7 8 ``` + ## Checkpoint 1: *estimate: 30-40 minutes* -Read the code of provided program, and then run the program to see its output. After that, replace the STL queue library with the STL stack library, and implement the queue using two stacks. Do not change the *main* function. Do not change the *levelOrderTraversal* function, except this line: +First, read the code of the provided program, and run the program to see its output. + +- Play this [animation](https://jidongxiao.github.io/CSCI1200-DataStructures/animations/trees/level_order/index.html) to see how level order traverse works. + +Then, replace the STL queue library with the STL stack library, and implement the queue using two stacks. Do not change the *main* function. Do not change the *levelOrderTraversal* function, except this line: ```cpp std::queue myQueue;