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.
The third bullet point has to do with writing using something like System.out or print etc. Those types of operations like reading or writing to a file or input and output (I/O) takes a lot of time for the computer to do. So instead of writing a bunch of different times. You can instead build a string and then just write at the end. Since in the case of this problem, you don't need to print until the very end.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Big Sorting
You are viewing a single comment's thread. Return to all comments →
The third bullet point has to do with writing using something like System.out or print etc. Those types of operations like reading or writing to a file or input and output (I/O) takes a lot of time for the computer to do. So instead of writing a bunch of different times. You can instead build a string and then just write at the end. Since in the case of this problem, you don't need to print until the very end.