Adding rodcutting problem solution in node.js