We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
@hokennethk sure. In the boilerplate code that splits on "\n", use map to remove the "\r" from all the lines, too. It is in the process.stdin.on('end' event handler. Add ".map(line => line.replace(/\r/g,''))" after the "input_stdin.split('\n')" part.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
The Grid Search
You are viewing a single comment's thread. Return to all comments →
@hokennethk sure. In the boilerplate code that splits on "\n", use map to remove the "\r" from all the lines, too. It is in the process.stdin.on('end' event handler. Add ".map(line => line.replace(/\r/g,''))" after the "input_stdin.split('\n')" part.