func FibonacciSequence(n int) int {
	if len(memo) < n {
		tmp := make([]int, 2*(n-len(memo)))
		for i := range tmp {
			tmp[i] = -1
		}
		memo = append(memo, tmp...)
	}

	if memo[n] != -1 {
		return memo[n]
	}

	memo[n] = FibonacciSequence(n-1) + FibonacciSequence(n-2)
	return memo[n]
}
// FibonacciSequence returns the nth fibonacci number
FibonacciSequence returns the nth fibonacci number
// FibonacciSequence returns the nth fibonacci number
func FibonacciSequence(n int) int {
	if len(memo) < n {
		tmp := make([]int, 2*(n-len(memo)))
		for i := range tmp {
			tmp[i] = -1
		}
		memo = append(memo, tmp...)
	}
	if memo[n] != -1 {
		return memo[n]
	}
	memo[n] = FibonacciSequence(n-1) + FibonacciSequence(n-2)
	return memo[n]
}
func FibonacciSequence ( n int ) int { if len ( memo ) < n { tmp := make ( [ ] int , 2 * ( n - len ( memo ) ) ) for i := range tmp { tmp [ i ] = - 1 } memo = append ( memo , tmp ... ) } if memo [ n ] != - 1 { return memo [ n ] } memo [ n ] = FibonacciSequence ( n - 1 ) + FibonacciSequence ( n - 2 ) return memo [ n ] }
FibonacciSequence returns the nth fibonacci number
FibonacciSequence returns the nth fibonacci number