From cadd8342b7229750434a185ee09c6f1810dd9b68 Mon Sep 17 00:00:00 2001 From: Minnu <110650599+minnukota381@users.noreply.github.com> Date: Mon, 4 Mar 2024 18:52:29 +0530 Subject: [PATCH] Created 4.1.4 Understanding Tail Recursion --- .../4. Recursion/4.1.4 Understanding Tail Recursion | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 Data Structures and Algorithms using C/4. Recursion/4.1.4 Understanding Tail Recursion diff --git a/Data Structures and Algorithms using C/4. Recursion/4.1.4 Understanding Tail Recursion b/Data Structures and Algorithms using C/4. Recursion/4.1.4 Understanding Tail Recursion new file mode 100644 index 0000000..774b945 --- /dev/null +++ b/Data Structures and Algorithms using C/4. Recursion/4.1.4 Understanding Tail Recursion @@ -0,0 +1,6 @@ +int factTR(unsigned int n, unsigned int a) { + if (n == 0) + return a; + else + return factTR(n - 1, n * a); +}