You are viewing a single comment's thread. Return to all comments →
I'm new to HackerRank--why is there already code in the solution window? Shouldn't we be coding things from scratch?
I think it's because of how you get the data from the input, instead of you declaring it?
The code in the window is what the HackerRank server runs. You will write your code in the important-looking function that's mostly empty. ("main", or something). There might already be code there that declares some variables for you to use (like "arr" for an array of the numbers).