This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); |