development #1

Merged
MarcelloMartins merged 23 commits from development into master 2022-10-31 21:45:09 +00:00
Showing only changes of commit 4552cc3b13 - Show all commits

View File

@ -1,4 +1,10 @@
export function fibonacci(value) { export function fibonacci(value) {
// implementar logica aqui // implementar logica aqui
if(value < 0) return 0;
if(value < 2) return value;
if(memo[value]) return memo[value];
let result = fibonacci(value - 1, memo) + fibonacci(value - 2, memo);
memo[value] = result;
console.log(memo);
return result;
} }