From dea088c00aacf31c290e7e5ff48f81a6ddc6ebc0 Mon Sep 17 00:00:00 2001 From: Anany Dev <136434860+ananydev@users.noreply.github.com> Date: Sun, 10 Nov 2024 00:52:59 +0530 Subject: [PATCH] Delete Dynamic Programming/Climbing stairs/program.c --- Dynamic Programming/Climbing stairs/program.c | 26 ------------------- 1 file changed, 26 deletions(-) delete mode 100644 Dynamic Programming/Climbing stairs/program.c diff --git a/Dynamic Programming/Climbing stairs/program.c b/Dynamic Programming/Climbing stairs/program.c deleted file mode 100644 index 601a2f6c..00000000 --- a/Dynamic Programming/Climbing stairs/program.c +++ /dev/null @@ -1,26 +0,0 @@ -#include - -int climbStairs(int n) -{ - if (n == 0 || n == 1) - { - return 1; - } - - int dp[n + 1]; - dp[0] = dp[1] = 1; - - for (int i = 2; i <= n; i++) - { - dp[i] = dp[i - 1] + dp[i - 2]; - } - - return dp[n]; -} - -int main() -{ - int n = 5; // Example input - printf("Ways to climb %d stairs: %d\n", n, climbStairs(n)); - return 0; -}