Various algorithms implemented in Node.js