Skip to content

Instantly share code, notes, and snippets.

@KKrisu
Created August 13, 2013 07:54
Show Gist options
  • Save KKrisu/6218825 to your computer and use it in GitHub Desktop.
Save KKrisu/6218825 to your computer and use it in GitHub Desktop.
function getHash (v) {
return v.x+'_'+v.y+'_'+v.z;
}
function solve(input) {
var l = input.length,
map = {},
hash;
while(l--) {
hash = getHash(input[l]);
if(map[hash]) {
return true;
}
map[hash] = true;
}
return false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment