🍄 "How soon 'not now' becomes 'never'!" - Martin Luther
function isRectangle(a, b, c, d) {
if (a === b && a === c && a === d && c === d && b === c && b === d)
return true;
else if (a === b && c === d)
return true;
else if (a === d && c === b)
return true;
else if (a === c && d === b)
return true;
else
return false;
}
This week’s question:
Let’s say that you have a bunch of ropes of various lengths, and you want all of them to be the same length. You have to find the shortest one, and cut all of the ropes to be that length.
Given an int array of rope lengths, return a new array of how much each rope should be cut.
Example:
> ropeCuts([2,2,5,1,6])
> [1,1,4,0,5]
Cool things from around the internet
The Legend of Zelda: Ocarina of Time’s dungeon design
A Mathematician’s Keyboard
How to Pick a Lock
Apple Leak Reveals Sudden iPhone X Cancellation
Joke
I was feeling kinda lonely so I bought some shares.
It’s nice to have a bit of company.
That’s all for this time, folks. Be safe, make good choices, and stretch your hands after reading this (it’s good for you).
cassidoo
Don't miss what's next. Subscribe to rendezvous with cassidoo:
Share this email: