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.
After testing the code you provide, I finally found the mistake in my opinion :))
I think the problem is in your string concatenation operation
varresult='';for(vari=0;i<100;i+=1){for(varj=0;j<numbers[i].length;j+=1){process.stdout.write(numbers[i][j]+' ');// add this line//result += numbers[i][j] + ' '; // here is the problem}}//console.log(result);
The input size of testcase#5 is 10^6, so it might be too large for printing such a long string(the length of the string might be 10^6 or bigger) once a time!
I'm not familiar with JS, hoping this will help u! :))
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
The Full Counting Sort
You are viewing a single comment's thread. Return to all comments →
After testing the code you provide, I finally found the mistake in my opinion :))
I think the problem is in your string concatenation operation
The input size of testcase#5 is 10^6, so it might be too large for printing such a long string(the length of the string might be 10^6 or bigger) once a time!
I'm not familiar with JS, hoping this will help u! :))