Collection of (for now, sorting) algorithms in JavaScript