GithubHelp home page GithubHelp logo

dynamic-programming's Introduction

Coin Change Problem Solutions

Description

This repository contains solutions for the Coin Change Problem implemented in C++. It includes two approaches:

  1. A Greedy algorithm-based solution.
  2. A Dynamic Programming-based solution.

The Coin Change Problem involves finding the minimum number of coins that make up a given amount of money, using coins of specified denominations.

Installation

No special installation is required. A C++ compiler is necessary to compile and run the program.

Usage

  1. Compile the C++ code using a C++ compiler.
  2. Run the executable.
  3. Input the required sum and the available denominations as prompted.

Examples

Input:

  • Total Sum: 137
  • Denominations: Dollar (100 cents), Quarter (25 cents), Dime (12 cents), Nickel (5 cents), Cent (1 cent)

Output:

  • Greedy Algorithm: "Sum can't be constructed for this problem"
  • Dynamic Programming: Total denominations used: 5

Contributing

Feel free to fork this repository and submit pull requests. Please adhere to the existing coding style and add comments where necessary.

Longest Common Subsequence Solutions

Description

This repository contains two implementations for solving the Longest Common Subsequence (LCS) problem: a simple recursive approach and a dynamic programming approach.

Installation

No specific installation required. Ensure you have a C++ compiler installed to run the program.

Usage

  1. Compile the C++ code.
  2. Run the executable.
  3. Follow the on-screen prompts to enter the sequences.

Examples

Input: Sequence 1: "ABCBDAB" Sequence 2: "BDCAB"

Output: LCS Length (Recursive): 4 LCS Length (Dynamic Programming): 4

Contributing

Contributions to this project are welcome. Please ensure your code adheres to the existing style conventions.

dynamic-programming's People

Contributors

rabailwaseem 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.