Giter Club home page Giter Club logo

dynamicprogramming-important-codes's Introduction

dynamicProgramming-Important-Codes

This repository contains the most important questions of dynamic programming and variations of each question so that it becomes easy to identify which approach is to applied in the given question.

Introduction:

Dynamic Programming is mainly an optimization over plain recursion. Wherever we see a recursive solution that has repeated calls for same inputs, we can optimize it using Dynamic Programming. The idea is to simply store the results of subproblems, so that we do not have to re-compute them when needed later.

Why Dynamic Programming?

Recursion and dynamic programming (DP) are very depended terms. You can not learn DP without knowing recursion.

Before getting into the dynamic programming lets learn about recursion.

Recursion

Recursion is a programming technique where programming function calls itself.

Every recursion functions consist of two parts.

  • code to execute in the recursive function
  • termination condition or base condition

Recursion is very useful when your programs need to be divided into multiple parts and output of the one part is depends on the output of the previous part.

Recursion risks to solve identical subproblems multiple times. This inefficiency is addressed and remedied by dynamic programming.

dynamicprogramming-important-codes's People

Contributors

aniket10081998 avatar arpita-gupta1902 avatar atri2107 avatar divyanshkhatana avatar ishan-sinha avatar sawar007 avatar shreya-jalan avatar somya1212 avatar yashvardhan21 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.