Skip to content

Instantly share code, notes, and snippets.

@Underdoge
Last active February 24, 2017 04:26
Show Gist options
  • Save Underdoge/3435de664698a26043823b7c38c50a84 to your computer and use it in GitHub Desktop.
Save Underdoge/3435de664698a26043823b7c38c50a84 to your computer and use it in GitHub Desktop.
Make Array Consecutive 2
function makeArrayConsecutive2(statues) {
statues=statues.sort((a,b)=>a-b);
return(statues[statues.length-1]-statues[0]+1-statues.length);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment