Collection of common algorithms implemented in JavaScript