Skip to content

A few math magic#1

Open
denizumutdereli wants to merge 1 commit intobradhanson:masterfrom
denizumutdereli:patch-1
Open

A few math magic#1
denizumutdereli wants to merge 1 commit intobradhanson:masterfrom
denizumutdereli:patch-1

Conversation

@denizumutdereli
Copy link

//another approach
function arithGeo(arr) {
if (arr.length === 1 || arr.length === 0) {
return -1;
}

if(arr[0]*arr[2] === arr[1]*arr[1]) return "Geometric"; 
else return "Arithmetic";

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant