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.
Since the size of testcase#5 is too large, I still can't figure out the reason why your string operation(result += numbers[i][j] + ' ') is wrong. But if u puts process.stdout.write outside the for loop i.e. use process.stdout.write to print result directly, it will be WA. Hence, it it the reason why I think the string operation has problem.
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 →
I submitted the change and it really works for me :)
Here is the code:
Since the size of testcase#5 is too large, I still can't figure out the reason why your string operation(
result += numbers[i][j] + ' '
) is wrong. But if u putsprocess.stdout.write
outside the for loop i.e. useprocess.stdout.write
to printresult
directly, it will be WA. Hence, it it the reason why I think the string operation has problem.