Skip to content

Instantly share code, notes, and snippets.

@psstoev
Created March 21, 2012 22:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save psstoev/2153872 to your computer and use it in GitHub Desktop.
Save psstoev/2153872 to your computer and use it in GitHub Desktop.
Count-change
T(0, n) = 1
⎧ 0, m < 0 или n = 0
T(m, n) = ⎨
⎩ T(m, n - 1) + T(m - Cₙ, n), Cₙ - номиналът на n-тата монета, някаква константа
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment