forked from M3-Academy/challenge-algorithms-v2.0
Merge pull request 'fix: optimizacão de isAnagram e maxValue' (#2) from feature-algorithms into master
Reviewed-on: #2
This commit is contained in:
commit
e25d232708
@ -1,5 +1,7 @@
|
||||
export function isAnagram(word1, word2) {
|
||||
// implementar logica aqui
|
||||
if ((!word1) || (!word2))
|
||||
return false;
|
||||
if (word1 != word2){
|
||||
if (word1.lenght == word2.lenght){
|
||||
word1 = word1.toLowerCase();
|
||||
@ -15,7 +17,8 @@ export function isAnagram(word1, word2) {
|
||||
else
|
||||
return false;
|
||||
}
|
||||
else return false;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
else return false;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user