Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Solving coin change problem 2 using generating functions

License

NotificationsYou must be signed in to change notification settings

thekamik/Solving-coin-change-problem-2-using-generating-functions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

This repository contains a Python solution to the "Coin Change 2" problem, where the objective is to determine the number of ways to make change for a given amount using specific coin denominations.

The solution is designed to be flexible, allowing it to compute the number of ways to make change for any target amount, not just the specified 5000 PLN. By utilizing generating functions, the solution can easily adapt to different target values and coin denominations.

Exercise

In how many ways can 5000 PLN be exchanged using coins of 1, 2, 3, and 5 PLN denominations?

Key Features

  • Generality: Solves the coin change problem for any input amount, using any specified set of coin denominations.
  • Efficient Computation: Uses generating functions to effectively calculate the number of ways to make change.

Libraries Used

  • SymPy: For symbolic mathematics, polynomial expansion, and simplification.
  • itertools: For iteration utilities.
  • functools: For functional programming utilities.

About

Solving coin change problem 2 using generating functions

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp