Git Product home page Git Product logo

15-days-of-recursion's Introduction

Recursion 💥

Definition: 👁️‍🗨️

When a function calls itself until a specific condition is met known as "RECURSION".



Recursion Terminologies ✍️ :

1. Base Condition 🚀:

Base Case is defined as the condition in a Recursive Function, that tells the function when to stop.
It is the most important part of every Recursion because if we fail to include this condition it will result in INFINITE RECURSIONS.

2. Recurrence Relation 🚀:

A recurrence relation is an equation that represents a sequence based on some rule.
It helps in finding the subsequent term (next term) dependent upon the preceding term (previous term). If we know the previous term in a given series, then we can easily determine the next term.

3. Stack In Recursion 🚀:

The computer uses a stack to remember which function call it is currently processing.
Each time the function is called, a new stack frame is created and added to the top of the stack. This frame contains the function's local variables, parameters, and the return address.

📌 The main idea behind the Recusion is that it helps you break down bit problems into smaller ones. Often, the recursive solution can be simpler to read than the iterative one. 🏷️



DAY-01 📙 :

Problem Solved:

Sr. No. Title Solution
1. Print number from 1 to 5 View Solution
2. Print N to 1 View Solution
3. Print name N times View Solution
4. Print 1 to N backtracking View Solution
5. Print N to 1 backtracking View Solution



DAY-02 📘 :

Problem Solved:

Sr. No. Title Solution
1. Factorial of a number N View Solution
2. Check string - Palindrome View Solution
3. Recursive sequence View Solution
4. Reverse array View Solution
5. Sum of N numbers View Solution



DAY-03 📗 :

Problem Solved:

Sr. No. Title Solution
1. 'N'th Fibonacci term View Solution
2. Print Subsequences View Solution



DAY-04 📙 :

Problem Solved:

Sr. No. Title Solution
1. Count subsequence with sum K View Solution
2. Print only one subsequence with sum K View Solution
3. Print subsequences with sum K View Solution

15-days-of-recursion's People

Contributors

aviwani1234 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.