feature/algoritmos #1

Merged
LeonardoPereiraRocha merged 10 commits from feature/algoritmos into master 2022-11-02 20:24:57 +00:00
2 changed files with 18 additions and 2 deletions
Showing only changes of commit e3706d5771 - Show all commits

View File

@ -1,4 +1,5 @@
export function fibonacci(value) {
//
let previous = 0;
let sum = 0;
let next = 1;

View File

@ -1,4 +1,19 @@
export function isAnagram(word1, word2) {
// implementar logica aqui
let testWord1;
let testWord2;
if (word1.length !== word2.length) {
return false;
}
testWord1 = word1.toLowerCase('').split('').sort().join('');
testWord2 = word2.toLowerCase('').split('').sort().join('');
if (testWord1 === testWord2) {
return true;
}
return false;
}