add short explanation

This commit is contained in:
Vitor Oliveira 2021-05-16 22:12:36 -07:00 committed by GitHub
parent fba17c66e9
commit 0884b95d4e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -30,6 +30,17 @@
# Approach: Using Recursion + Memoization, Top Down Dynamic Programming # Approach: Using Recursion + Memoization, Top Down Dynamic Programming
# #
#
# Algorithm: Dynamic Programming state transition.
#
# F(0) = 1
# F(n)a = F(n-1)a + F(n-1)e + F(n-1)i + F(n-1)o +F(n-1)u
# F(n)e = F(n-1)e + F(n-1)i + F(n-1)o + F(n-1)u
# F(n)i = F(n-1)i + F(n-1)o +F(n-1)u
# F(n)o = F(n-1)o + F(n-1)u
# F(n)u = F(n-1)u
#
# @param {Integer} n # @param {Integer} n
# @return {Integer} # @return {Integer}