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.
This problem is unfair. The problem description explicitly says to add the value to all the specified array indices, and the example re-enforces this. While the solution is clever, it does not derive from the problem description.
Although the program framework does not require the final array -- which could be a bit of a hint -- it seems like the written description went out of its way to be misleading.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Array Manipulation
You are viewing a single comment's thread. Return to all comments →
This problem is unfair. The problem description explicitly says to add the value to all the specified array indices, and the example re-enforces this. While the solution is clever, it does not derive from the problem description.
Although the program framework does not require the final array -- which could be a bit of a hint -- it seems like the written description went out of its way to be misleading.