Skip to content

Instantly share code, notes, and snippets.

View Yonet's full-sized avatar
🎯
Focusing

Yönet Yonet

🎯
Focusing
View GitHub Profile
//given an array of integers (x), and an integer (y), returns true if any two of the integers in x add up to y.
var addsToY = function(arr, y) {
for(var i = 0; i < arr.length; i ++) {
for (var j = i + 1; j < arr.length; j++) {
if(arr[i] + arr[j] === y) return true;
}
}
return false;
}
var shufflin = function (n, c) {
var deck;
var count = 1;
//array to hold the frequency of the cards appearing in the same index
var frequency = new Array(n);
//creates a deck with n values
var createDeck = function (n) {
var arr = [];
for (var i = 0; i< n; i++) {
@Yonet
Yonet / men.JSON
Created September 10, 2013 04:07 — forked from krgeppert/men.JSON
[{"id":"0m","hotness":0.591468543279916,"rankings":[{"id":"21w","hotness":0.17892177822068334},{"id":"26w","hotness":0.35050580697134137},{"id":"41w","hotness":0.2367910670582205},{"id":"22w","hotness":0.3154465176630765},{"id":"35w","hotness":0.033567901235073805},{"id":"15w","hotness":0.25578767503611743},{"id":"37w","hotness":0.09405278996564448},{"id":"40w","hotness":0.2901887996122241},{"id":"18w","hotness":0.07633938547223806},{"id":"7w","hotness":0.13957931869663298},{"id":"43w","hotness":0.08935506152920425},{"id":"6w","hotness":0.44330935273319483},{"id":"1w","hotness":0.3342087329365313},{"id":"44w","hotness":0.3334620089735836},{"id":"11w","hotness":0.7703214744105935},{"id":"12w","hotness":0.25622058450244367},{"id":"0w","hotness":0.22968668141402304},{"id":"30w","hotness":0.2678251701872796},{"id":"17w","hotness":0.21898658387362957},{"id":"48w","hotness":0.43219820223748684},{"id":"38w","hotness":0.23681716341525316},{"id":"25w","hotness":0.3409113010857254},{"id":"23w","hotness":0.2041905778460