From bb6d6b92458799f856328a9936bb55196b838f60 Mon Sep 17 00:00:00 2001 From: Jidong Xiao Date: Fri, 22 Sep 2023 12:26:47 -0400 Subject: [PATCH] adding fact animation --- lectures/07_order_notation_recursion/README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lectures/07_order_notation_recursion/README.md b/lectures/07_order_notation_recursion/README.md index 11a0e6d..d3f7898 100644 --- a/lectures/07_order_notation_recursion/README.md +++ b/lectures/07_order_notation_recursion/README.md @@ -160,6 +160,8 @@ int fact(int n) { } ``` +- Play this [animation](https://jidongxiao.github.io/CSCI1200-DataStructures/animations/recursion/factorial/index.html) to see how this fact() function works. + ```cpp int intpow(int n, int p) { if (p == 0) { @@ -269,6 +271,6 @@ The Fibonacci sequence is defined: Fibonacci sequence. 2. Write an iterative version of Fibonacci that uses a vector to improve the running time of the function. 3. What is the order notation of the running time for each version? -- Play this [animation](https://jidongxiao.github.io/CSCI1200-DataStructures/animations/dynamic_memory/example1/index.html), which illustrates the time complexity of the recursvie version. +- Play this [animation](https://jidongxiao.github.io/CSCI1200-DataStructures/animations/recursion/fibonacci/index.html), which illustrates the time complexity of the recursvie version. 4. What is the order notation of the memory usage for each version?