From d68cc4281a23249a4fcaeca433128d0748568001 Mon Sep 17 00:00:00 2001 From: Dmitry Non Date: Tue, 15 Oct 2019 10:51:24 +0100 Subject: [PATCH] delete recursion from root there's theory/recursion for that --- sheets/recursion | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 sheets/recursion diff --git a/sheets/recursion b/sheets/recursion deleted file mode 100644 index 68fe022..0000000 --- a/sheets/recursion +++ /dev/null @@ -1,11 +0,0 @@ -# Recursion -# Def: "...is a method where the solution to a problem depends on solutions to smaller instance of the same problem.." - wiki -# TL;DR: a function that calls itself inside its body. - -# Recursive programs - Pseduocode -function factorial: -input: integer n such that n >= 0 -output: n * (n-1) * (n-2) * ... * 1 = n! - - 1. if n is 0, return 1 - 2. else, return ( n * factorial(n-1) )