Skip to content

Instantly share code, notes, and snippets.

View ClayTaeto's full-sized avatar

Claytaeto ClayTaeto

View GitHub Profile
@ClayTaeto
ClayTaeto / triplets.js
Created February 8, 2017 06:16
Find the Triplets
function findTriplets(list){
//TODO: assert list is array of numbers
//if there isn't enough items for a single result
if (!list.length && list.length < 3) {
return false; //throw?
}
list.sort();