Merge pull request 'develop' (#2) from develop into master

Reviewed-on: #2
This commit is contained in:
Gustavo Rallenson Gonçalves Da Silva 2022-11-02 00:50:43 +00:00
commit c24b792541
2 changed files with 8 additions and 4 deletions

View File

@ -1,7 +1,10 @@
export function fibonacci(value) {
// implementar logica aqui
if (value <= 1) {
return value;
}
return fibonacci(value -1 ) + fibonacci(value -2)
const fib = [0,1]
let i = 1
while (value > fib.length-1){
fib.push(fib[i - 1] + fib[i])
i ++
}
return fib[value]
}

View File

@ -1,5 +1,6 @@
export function isPrime(value) {
// implementar logica aqui
if(value === 1){
return false
}else{