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.
Your code works like a charm. But still unable to understand the logic behind it.
specially the last part.
If I do sum of only posive numbers of array then it fails most of the cases. But I do through for loop which I think is doing the same task passes all test.
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 →
Your code works like a charm. But still unable to understand the logic behind it.
specially the last part.
If I do sum of only posive numbers of array then it fails most of the cases. But I do through for loop which I think is doing the same task passes all test.